You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my project I'd like to have a navigation with subnavs that are outside of the route itself and differ for each route. Currently I use a wrapper component in each route that calls useLocation and saves it to a store so I can access the active path and see when it changes.
I think a cleaner solution would be to expose activeRoute in Router.svelte
Locally, I have got it to work by adding export to activeRoute declaration (and adding a line to Router.d.ts) but I don't know if it has any side effects.
The text was updated successfully, but these errors were encountered:
In my project I'd like to have a navigation with subnavs that are outside of the route itself and differ for each route. Currently I use a wrapper component in each route that calls
useLocation
and saves it to a store so I can access the active path and see when it changes.I think a cleaner solution would be to expose
activeRoute
in Router.svelteLocally, I have got it to work by adding
export
toactiveRoute
declaration (and adding a line to Router.d.ts) but I don't know if it has any side effects.The text was updated successfully, but these errors were encountered: