TanStackT
TanStack14mo ago
2 replies
brilliant-lime

Context not updating

I'm trying to use Route.useRouteContext hook to get fetched data (user, todos, etc.) but the data is not updated.
If is a refreshed page (like F5, target _blank, etc.) the data is the default value (fallback).
If you change the current page (using navigate or Link component) the value is loaded normally.

Reproduction: https://stackblitz.com/edit/vitejs-vite-qzfl5f?file=src%2Froutes%2Findex.lazy.tsx
CleanShot_2024-11-19_at_18.24.57.png
CleanShot_2024-11-19_at_18.25.44.png
Was this page helpful?