This repository has been archived by the owner on Jul 19, 2020. It is now read-only.
Releases: yewstack/yew_router
Releases · yewstack/yew_router
v0.11.0
v0.10.0
v0.9.0
v0.8.1
✨ 0.8.1 (2020-1-10)
-
🛠 Fixes
- Fixed a dependency issue with
wasm-bindgen
that would cause builds to fail when building for thewasm32-unknown-unknown
target.
- Fixed a dependency issue with
v0.8.0
✨ 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
v0.7.0
✨ 0.7.0 (2019-11-11)
-
⚡️ Features
- Greatly improve the quality of matcher string parsing errors. [171]
- Bring back
{}
,{*}
, and{<number>}
capture syntax for tuple structs/enums variants.
If your variant or struct doesn't have named fields, you don't need to supply names in the matcher string [116] - Redirects that happen in the
Router
component actually change the url in the browser [171] - Allow parsing (almost) any character after a
#
is encountered in matcher strings.
This enables this library to be used as a fragment router. [150]
-
🛠 Fixes
-
🚨 Breaking changes
- Upgrade to Yew 0.10.0
- Switch components now need to implement
Clone
in order to be used with theRouter
[171]
v0.6.1
Breaking Changes
- None
Features
- Allow a broader set of capture syntaxes for unnamed structs/variants. Identifiers don't need to be specified within the
{}
delimiters because the fields themselves don't have names. Now{}
,{*}
, and{3}
are valid syntax when working with Tuple-structs/variants. - Allow
!
special character in more places. - Rework parser "compiler" error messages. Better messages will be shown when there are errors in the routing syntax.
- Add
impl<SW: Switch, T> From<SW> for Route<T>
. Now Routes can be created from Switches easily. - Allow escaping
{
,}
, and!
special characters by using{{
,}}
, and!!
respectively. - Provide a correct error message when attempting to derive switch for a Unit struct/variant with a capture group.
Bug Fixes
- None
v0.6.0
This release represents a significant departure from the prior works from both @saschagrunert and @hgzimmerman. So much so that it represents a new beginning for the project (real changelogs will be coming for subsequent releases).