Open ralyodio opened 4 years ago
Hey @chovy Thank you for the very detailed explanation.
Any update or method of fixing this issue?
I have same issue active does not work properly
I'll try and fix this next week @drannex42 @mylastore cc/ @chovy
I'm having the same issue.
Sorry but I can't reproduce the issue mentioned here.
Here is an example where I'm using routeIsActive
and it works fine.
One reason you may have the error is if you try to use routeIsActive
outside of the scope of the router.
For instance:
<div>
<header>
<TopMenu />
</header>
<main>
<Router {routes} />
</main>
</div>
In this scenario if you try to use routeIsActive
inside the TopMenu component you will get that error because routeIsActive
is outside of the router component and it doesn't know anything about any route.
Please check https://github.com/jorgegorka/svelte-router#usage for an example of how to use the Router as the main component that renders all the others.
active class not working