#routedata not updating on A tag navigation

2 messages · Page 1 of 1 (latest)

regal thunder
#

I am navigating with a standard solid-start imported <A>.

When <A> is clicked routdata is not refetched.

I tried putting a refetchRoutData in a createdRenderEffect on useLocation().pathname change but it gives me strange lifecycle errors about code needing to be wrapped in a isServer.

I also see some similar examples in here regarding my issue and they are using keys to solve it but I am not sure I understand that because my route change does not include params it is just a standard route change like "/this" -> "/that".

Have been stuck on this for a while any help appreciated!

regal thunder
#

I solved this by just adding a key:

{ key: () => ["path", location.pathname] }