Closed pmcalabrese closed 4 years ago
I have the same issue. How do you quickly query the current route?
Parsing window.location
can be a bummer, especially with route.base
, etc.
Use case: set class='active'
for anchor tags that match the current route.
Hey @pmcalabrese
Do you need to transform/adjust the current route (ie. are you trying to extracting a value from it), or is your use cases similar to what @bminer described (ie. emphasize links which match the current route)?
Closing this issue because it's related to an old router version. Please update to the latest @riotjs/route
version if you can.
I'd like to know my current route, there is a way with the router? or should I use regular JS?