Accessing cookies in routeData()
Is there any method to access cookies within createRouteData within routeData?
3 Replies
The docs show how to create a session stored in cookies. You can use the hooks similar to the examples within a routeData function to access the session and return whatever data you want https://start.solidjs.com/api/createCookieSessionStorage
SolidStart Beta Docuentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
Awesome, I've seen this, should the sessions be created on the server, where they are automatically propagated to the client, or should they be created on the client and then sent to the server, as it's unclear in the docs where createCookieSessionStorage should be called
it looks like it's in the global scope
in my project I make the hooks in a backend folder and call them from within
createServerAction$
and createServerData$
calls