In latest release 1.28.4 useRouteContext()-hook returns undefined on first start
Hey 👋🏽
in latest release 1.28.4 the behavior of
useRouteContext or beforeLoad has changed.
I return the user from beforeLoad, but the useRouteContext-hook return undefined in the component.
Please checkout the reproduction.
https://stackblitz.com/edit/tanstack-router-cfgel4?file=src%2Froutes%2Findex.tsx
Update
The issue was introduced in 1.28.2, maybe in https://github.com/TanStack/router/commit/d09db60415b4a6e8b32ec771f53015666a5c52e2
Thanks3 Replies
other-emeraldOP•2y ago
I posted an issue https://github.com/TanStack/router/issues/1478
GitHub
Since version 1.28.2, the useRouteContext() hook returns undefined ...
Describe the bug It seems that in release 1.28.2 the behavior of useRouteContext or beforeLoad has changed. I return a context-change from beforeLoad, but the useRouteContext-hook return undefined ...
stormy-gold•2y ago
Fixed!
other-emeraldOP•2y ago
Thanks @Tanner Linsley