createStore doesn't trigger createResource refetch action.
How can I make createResource work with a store, if possible at all? When I pass a simple signal like perPage to createResource, it works smoothly. However, when I pass a whole store to it, it does not trigger the refetch.
4 Replies
That's because only the leaves of the store tree are reactive, the branches are not.
Thought so, just wasn't sure. Gonna use regular signals for this then.
It's working nicely.
Or you can use the useSearchParams hook which provides a setter and getter so you can also refresh/reload the page and still have the previous page and limit.
https://docs.solidjs.com/solid-router/reference/primitives/use-search-params#usesearchparams
Oh thanks, i'll refactor try this out.