Create one global store with multiple createResource
Hello,
I am a beginner programmer developing a small local app with Tauri and SolidStart.
In the past, I have already worked on a personal website with Nuxt/Vue/Pinia.
The data being exclusively stored on a local sqlite database, I am trying to load all the data from the start of the program execution, and intend to make it available to all components from a store.
How do I initialize my store within context with createResource ? my context is undefined
I've made sure the data fetching part works. I tried to wrap the AppContext.Provider with Suspense, my guess being the async is messing things up here. Thank you
2 Replies
The first thing that jumps at me is that this would try to execute the SQL on the client/browser. I dont know if thats the issue but it should look like
Thank you for your answer!
I wants the code to run on the client side, this is meant to be a desktop app, and if in the future I went down the web app road, I would still go client side first with indexeddb and a remote db sync of some sort.
I tried the directive to check, and the error is still there 😦
But I didn't know the "use server" directive could go there, thanks !