From efe4ce522159df421b392b7755b12f3ede1cdb77 Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier Date: Fri, 1 Dec 2023 23:17:37 +0100 Subject: [PATCH] Less error prone yew-router instructions 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. --- website/docs/concepts/router.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/website/docs/concepts/router.mdx b/website/docs/concepts/router.mdx index 75613394c12..ec313daeb9b 100644 --- a/website/docs/concepts/router.mdx +++ b/website/docs/concepts/router.mdx @@ -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`: - - -```toml -yew-router = { git = "https://github.com/yewstack/yew.git" } +```sh +cargo add yew-router ``` The utilities needed are provided under `yew_router::prelude`,