Releases: yewstack/yew
v0.17.3
Changelog
-
⚡️ Features
- Added
prompt
function toDialogService
. [@teymour-aldridge, #1350] - Implement
From<&[T]>
whereT: AsRef<str>
forClasses
. [@alexschrod, #1448] - Added
batch_callback_once
toComponentLink
. [@ctron, #1463]
- Added
-
🛠 Fixes
v0.17.2
v0.17.1
v0.17.0
Changelog
-
⚡️ Features
-
Allow agents to send input messages to themselves. [@mkawalec, #1278]
-
Rendering performance has been improved by ~20%. [@jstarry, #1296, #1309]
-
html!
: Elements can be specified with dynamic tag names. [@siku2, #1266]In order to specify a dynamic tag name, wrap an expression with
@{..}
:let tag_name = "input"; html! { <@{tag_name} value="Hello" /> }
-
HTML button element
type
can now be specified ("submit"
,"reset"
, or"button"
). [@captain-yossarian, #1033] -
All global event listeners can be used as listeners (
onerror
,onloadend
, and many more). [@siku2, #1244] -
PartialEq
is now implemented forVChild
when properties also implementPartialEq
. [@kellpossible, #1242] -
Agent callbacks now accept
Into<Message>
to improve ergonomics. [@totorigolo, #1215] -
Agents can now send messages to themselves. [@totorigolo, #1215]
-
-
🛠 Fixes
-
Bincode dependency version has been loosened
1.2.1
->1
. [@jstarry, #1349] -
Keyed list ordering algorithm has been fixed. [@totorigolo and @jstarry, #1231]
-
html!
:key
andref
are no longer ignored for components with no properties. [@jstarry, #1338] -
html!
: List rendering behavior is consistent no matter which syntax is chosen. [@siku2, #1275]html! { for node_list }
is now equivalent tohtml! { node_list }
whennode_list
is aVec<VNode>
. -
KeyboardService
events can now have default behavior prevented. [@ghpu, #1286] -
Yew will check the current DOM
input
value before comparing with the desired value. [@ShadoySV, #1268] -
html!
: Void elements (<br/>
,<input />
) are no longer allowed to have children. [@kaoet, #1217] -
Local agents no longer require
Input
andOutput
to implementSerializable
. [@mkawalec, #1195]
-
-
🚨 Breaking changes
-
Renders are now done lazily and will not be executed until all updates have been processed. [@jstarry, #1309]
-
ConsoleService
,DialogService
,IntervalService
,RenderService
,TimeoutService
, andWebSocketService
methods are now static. [@teymour-aldridge, #1313] -
html!
:Children
no longer implementsRenderable
. [@siku2, #1275]Replace instances of
self.props.children.render()
withself.props.children.clone()
. -
Yew no longer stops propagation of events by default. [@jstarry, #1256]
Event propagation is usually stopped when you have event listeners attached to nested elements and do not want the event to bubble up from where it was first captured. If your app has this behavior, you can stop propagation by calling
stop_propagation()
on the desired event. -
The
onsubmit
listener now usesFocusEvent
insteadEvent
when usingweb-sys
. [@siku2, #1244] -
The
onmousewheel
andontouchenter
listeners have been removed. [@siku2, #1244] -
The
ondoubleclick
listener is now namedondblclick
. [@siku2, #1244] -
FetchService
methods are now static. [@teymour-aldridge, #1235]Instead of
FetchService::new().fetch(..)
you should now useFetchService::fetch(..)
-
The
send_message_batch
method has been removed fromAgentLink
. [@totorigolo, #1215] -
Minimum supported rust version has been bumped from
1.40.0
to1.42.0
. [@mkawalec, #1195] -
Every agent
Reach
type is now generic. [@mkawalec, #1195]In order to fix your app, simply append
<Self>
to the reach:Reach = Context
->Reach = Context<Self>
-
Removed
Global
agent because it was never implemented. [@jstarry, #1202] -
Reduced visibility of internal agent types that were not intended to be public. [@jstarry, #1202]
-
v0.16.2
v0.16.1
v0.16.0
Changelog
-
⚡️ Features
-
Added optional
id
,class
, andplaceholder
properties to theSelect
component. [@Stigjb, #1187] -
Re-export
web-sys
from Yew. This allows projects to useweb-sys
without adding it to theirCargo.toml
. [@D4nte, #1176] -
Added support for
Option
wrapped class names. [@liquidblock, #1085]The following code is now supported:
let color: &Option<String> = &self.color; html! { <div class=("btn", color)></div> }
-
Added
get_parent
andget_component
methods toComponentLink
to allow access to parent component state. [@jstarry, #1151]
-
-
🛠 Fixes
- Fixed bug that caused html class attributes to be set to an empty string. [@liquidblock, #1085]
- Fixed
Private
worker lifecycle event sending. [@joaquindk, #1146]
-
🚨 Breaking changes
v0.15.0
Attention!
yew
now uses web-sys
by default. If your project uses web-sys
, you can now drop the "web_sys"
feature from your yew dependency.
Don't worry stdweb
users, we have created a new alias crate for y'all called yew-stdweb
. In order to use it, update your Cargo.toml
yew dependency to the following:
yew = { version = "0.15", package = "yew-stdweb" }
Dev Survey Results
Thank you to everyone that took the time to fill out the Yew Dev Survey! 🙇♂️
Results have been posted here: https://github.com/yewstack/yew/wiki/Dev-Survey-%5BSpring-2020%5D
New Chatroom
We moved from Gitter to Discord! Join us: https://discord.gg/VQck8X4
Changelog
-
⚡️ Features
-
🛠 Fixes
- Split class names on whitespace when passed within
tuple
orVec
. [@bryanjswift, #1084]
- Split class names on whitespace when passed within
-
🚨 Breaking changes
- The
components
module has been moved outyew
and intoyew-components
. [@jstarry, #1132] - Replaced
mounted
component lifecycle method withrendered
which is called after each render. [@jstarry, #1072] - Components must now implement the
change
method (forgetting this was a very common issue). [@jstarry, #1071] - Yew now builds with
web-sys
by default. [@jstarry, #1092]
- The
v0.14.3
🛠 Fixes
- Remove
html!
component validation to allow generic components. [@mankinskin, #1065] - Improve
Debug
formatting forVTag
andVText
. [@dancespiele, #1059] - Implement
Default
forCallback
. [@TheNeikos, #1043]