{"id":62548,"library":"yew-router","title":"yew-router","description":"A router implementation for the Yew web framework.","status":"active","version":"0.20.0","language":"rust","source_language":null,"source_url":"https://github.com/yewstack/yew","tags":["yew","router","web","wasm","frontend"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nyew-router = \"0.20.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add yew-router","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Switch","correct":"use yew_router::prelude::*;"}],"quickstart":{"code":"use yew::prelude::*;\nuse yew_router::prelude::*;\n\n#[derive(Clone, Routable, PartialEq)]\nenum Route {\n    #[at(\"/\")]\n    Home,\n    #[at(\"/about\")]\n    About,\n}\n\nfn switch(routes: Route) -> Html {\n    match routes {\n        Route::Home => html! { <h1>{\"Home\"}</h1> },\n        Route::About => html! { <h1>{\"About\"}</h1> },\n    }\n}\n\n#[function_component(App)]\nfn app() -> Html {\n    html! {\n        <BrowserRouter>\n            <Switch<Route> render={switch} />\n        </BrowserRouter>\n    }\n}","lang":"rust","description":"Sets up a basic Yew application with client-side routing."},"warnings":[{"fix":"Ensure yew and yew-router are added to Cargo.toml with appropriate features.","message":"Requires Yew framework and its associated features (e.g., wasm-bindgen).","severity":"gotcha","affected_versions":">=0.19.0"}],"env_vars":null,"search_vec":"'framework':11 'frontend':16 'implement':6 'router':3,5,13 'wasm':15 'web':10,14 'yew':2,9,12 'yew-rout':1","created_at":"2026-06-17T16:32:46.065941+00:00","updated_at":"2026-06-17T16:32:46.065941+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/yewstack/yew","github":"https://github.com/yewstack/yew","docs":"https://docs.rs/yew-router/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}