ncls.
Explore posts from serversReact to route change in layout
Hello,
I have a sidenav in my layout which has URLs depending on the route parameter.
So e.g. I have the URL
/items/12
and now my sidenav should have links like /items/12/buy
, however that only works if I reload since the layout is static. If I now navigate to /item/13
, the link will say /items/undefined
I tried using a computed like this:
But this results in the exact same behavior.
What can I do to prevent this?11 replies