S
SolidJS12mo ago
oneiro

Solid-start client side state best practices

Hey folks, I noticed that the docs are still missing the section on the various kinds of application state. Therefore I wanted to ask here what is considere to be a good approach to handle state after hydration. Example: We use createServerData to build our initial route data. But after hydration we would like to have the state globally available. What would be the best approach to do this? Should we simply take the data and put it in a store or is there another recommended approach? Thanks in advance
2 Replies
oneiro
oneiro12mo ago
oooh, I just realized that there is useRouteData() to consume routeDate inside components. So I probably don't even need an extra store to manage the state
Alex Lohr
Alex Lohr12mo ago
Other than that, you can use all of solid's reactive system to manage your state however you like.