v0.8.0
版本发布时间: 2020-01-10 07:35:36
yewstack/yew_router最新发布版本:v0.11.0(2020-03-14 20:04:52)
✨ 0.8.0 (2020-1-9)
-
⚡️ Features
- Use a default type parameter of
()
to specify state-related type parameters instead of the old macro-based solution. [157] - Remove need for
JsSerializable
bound on the state parameter used for storing extra data in the history API.[185] - RouterLink and RouterButton now support having children Html. This deprecates the
text
prop. [192] - Fragment routing is now easily implementable by using an adapter because parser rules for the routing syntax were relaxed. [195] [211]
- Support using this library only with the Switch derive, allowing it to run in non-web contexts. [199]
- Use a default type parameter of
-
🚨 Breaking changes
- If you were using
default-features = false
, you will have to now specifyfeatures = ["service"]
to get the same behavior as before. [199] -
RouterAnchor
andRouterButton
now have props that take aroute: SW where SW: Switch
prop instead of alink: String
and they now have a mandatory type parameter that specifies thisSW
. [207] -
Route
's state field now holds aT
instead of anOption<T>
. [205] - Using default type parameters to specify the state typ instead of the macro that generated a module (
unit_state
) means that any imports from that module should now be replaced with the path that the type normally has in the project. [157]
- If you were using
-
Inconsequential
- Change state related type parameters from
T
toSTATE
. [208]
- Change state related type parameters from