tronis
Preloading route data with context access
I want to preload data for a Home route nested within an authenticated web app. I am doing this by passing a preload function like so:
However, in my preloadHome function I need to access some values from a context provider, like for example an auth API key. But the preloadHome function can't access any context providers that I have since they aren't in the rendering context.
What should I do in this situation?
10 replies