T
TanStack16mo ago
genetic-orange

Context is undefined in 'loader'

The application encounters a TypeError: Cannot read properties of undefined (reading 'queryClient') during the loading process. The loader function attempts to use context.queryClient to ensure query data but fails because context.queryClient is undefined.
No description
No description
No description
3 Replies
deep-jade
deep-jade16mo ago
please provide a minimal complete example by forking one of the examples from stackblitz
metropolitan-bronze
metropolitan-bronze16mo ago
We have an open issue for context being undefined after a redirect happens. I posted a minimal reproduction there
deep-jade
deep-jade16mo ago
ah I did not see the redirect in the screenshot, so most likely this is the same issue

Did you find this page helpful?