Less error prone yew-router instructions (#3552)

Simply add yew-router via cargo and hope that cargo figures out the
correct version. For most users referencing git directly is wrong
and might lead to annoying errors when compiling.

Before, there was even a comment to keep the version reference up-to-date which obviously did not work and seems unpractical.
This commit is contained in:
Andreas Bergmeier 2025-03-15 09:28:38 +01:00 committed by GitHub
parent 3a51a03c8b
commit 1e62f1e7c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,12 +8,10 @@ default behavior of requesting a different remote resource when a link is clicke
locally to point to a valid route in your application. The router then detects this change and then decides what to
render.
Yew provides router support in the `yew-router` crate. To start using it, add the dependency to your `Cargo.toml`
Yew provides router support in the `yew-router` crate. To start using it, add the dependency to your `Cargo.toml`:
<!-- Reminder: fix this when we release a new version of yew -->
```toml
yew-router = { git = "https://github.com/yewstack/yew.git" }
```sh
cargo add yew-router
```
The utilities needed are provided under `yew_router::prelude`,