Problem
With the below router definition, the router will always match the Home route and ignore the other definitions.
Maybe "/" has some special match-all semantics?
Making Home the last variant will make things work properly.
This is highly confusing behaviour, I spent quite a bit of time tracking this down.
#[derive(yew_router::Switch, Debug, Clone)]
pub enum AppRoute {
#[to = "/"]
Home,
#[to = "/feed/{category}"]
Feed(String),
#[to = "/post/{id}"]
Post(u64),
}
Environment:
- Yew version:
0.17.4
- yew-router:
0.14.0
Problem
With the below router definition, the router will always match the
Homeroute and ignore the other definitions.Maybe
"/"has some special match-all semantics?Making
Homethe last variant will make things work properly.This is highly confusing behaviour, I spent quite a bit of time tracking this down.
Environment:
0.17.40.14.0