TanStackT
TanStack10mo ago
8 replies
rubber-blue

Navigating: Router Context always Undefined in beforeLoad

Hey all.

I'm wondering what I misunderstood with router-context. What escapes me is that I have a _app folder which is my wrapper and in beforeLoad I check the context for an user object and I fetch it if not present in the context.

But when I navigate between the pages the context is always undefined and the user info get's fetched every time.

What am I missing here? Shouldn't the router context persist between the navigations?
Was this page helpful?