Stores & CreateResource
Why createResources doesn't work with a store?
console.log("currentPageParam", params.currentPage)
properly shows me that the store itself is being updated, but the signal change is not being passed into createResource like with a regular signal does. If instead i use a regular signal currentPage()
the signal is triggered on createResource, what i am missing?
7 Replies
My guess as to why the store version is not being triggered is that, since I'm not manually calling an item from the store, the reactive system isn't being set. With that said, is there a workaround for this, or should I just use a signal?
direct mutation without produce is not working with set store functions.
But if you want to store the data of your resource in a store, there is makeDeepSignal in the
@solid-primitives/resource
package.Sorry it's create not make
My mistake
Hmm, that seems to add way too much complexity into my problem, just gonna stick with regular signals for this use case.
Possible simple solution is to just do
Please use structuredClone() instead of abusing JSON.