Reading that route path is empty.
Have routing that is $ida/$idb .
I need to persist an item in the $ida route, but this item needs to access the current idb value to determine weather to make this item invisible or not. Which I normally do through
However when I visit $ida page, it errors with Invariant failed: Could not find an active match from "/$ida/$ifb/"
I could get around this by turning idb into a query param, but ideally this should be a pathing thing. Any strategies to get $ida route to read that there is no $idb
2 Replies
sensitive-blue•4mo ago
please provide a complete minimal example, e.g. by forking one of the existing router examples on Stackblitz
itchy-amethystOP•4mo ago
Turns out the solution is doing something like
const idb= useParams({strict: false})?.idb;