TanStackT
TanStack9mo ago
13 replies
dead-brown

Is beforeLoad supposed to run in this situation?

Hi! In my __root.tsx file, I check a session against my auth server in
beforeLoad
so I can update the router context.
In a sub route, if I go from /a to /b, is there a way to preserve the context without having to re-run the root
beforeLoad
hook? (or any parent
beforeLoad
hook really)

For context, my issue is that currently it's very slow because it makes a ton of requests for every page change
Was this page helpful?