Search
Star
Feedback
Setup for Free
Β© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Preloading route data with context access - SolidJS
S
SolidJS
β’
11mo ago
β’
9 replies
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
:
<Route path="/app/home" component={Home} preload={preloadHome} />
<Route path="/app/home" component={Home} preload={preloadHome} />
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
?
SolidJS
Join
Solid is a declarative reactive Javascript library for creating user interfaces.
12,274
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Preloading Data with 'use server'
S
SolidJS / support
2y ago
No route matched for preloading js assets
S
SolidJS / support
2y ago
Refetching Route Data with Solid Router
S
SolidJS / support
3y ago