T
TanStack2mo ago
noble-gold

link preload in layout not reacting to url

attached a video, but i have this layout with some shared links it pulls down the link options partly from the url, so when you hit a new url, you get new options to send to the right settings page this all works fine functionally, but i noticed that only the settings page on the first page load is getting preloaded. subsequent client navs from group to group is getting a shared link preload in the video you see the loader logging a confirmation that it's loading. we can tell which group's loader is running based on the id, and see that the id doesn't change despite client nav I thought maybe bc i had some weird abstraction around the links in that bar, but i recreated it (Settings2) with this link
<Link
to="/groups/$slug_id/settings"
params={{ slug_id: { id: props.id, slug: props.slug } }}
>
Settings 2
</Link>
<Link
to="/groups/$slug_id/settings"
params={{ slug_id: { id: props.id, slug: props.slug } }}
>
Settings 2
</Link>
its props are from
const params = Route.useParams()["slug_id"];
const params = Route.useParams()["slug_id"];
anything look weird here? having trouble solving this
2 Replies
rare-sapphire
rare-sapphire2mo ago
can you please provide a complete example by forking one of the existing router examples on stackblitz?
noble-gold
noble-goldOP2mo ago
sure, will do that tomorrow

Did you find this page helpful?