Does SolidStart Have a Global `Context` That Server Functions Can Use?

Other SSR frameworks have a concept of a "context" that is globally available to all server functions. For instance, Svelte Kit has event.locals (https://kit.svelte.dev/docs/load#shared-state), which can be set at the server entry point (hooks.server.ts). This context info is then available to all of the server data loaders. Similarly, Remix passes a context argument to its loader and actions. The value of context can be set by getLoadContext (https://remix.run/docs/en/v1/route/loader#context). Does SolidStart have anything similar? Or are there at least plans to add something like this in the future? Having a global context is really helpful when it comes to user identifiers.
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
lxsmnsyc
lxsmnsyc2y ago
different api from the question
XxX_MLG Noob_XxX
XxX_MLG Noob_XxXOP2y ago
Ah, I forgot to close this out. Yes, I opened an issue on the Solid Start repo sometime after opening this question. It seems we have event.locals now. Thanks @zihan
Want results from more Discord servers?
Add your server