Using solid-query dependent on resources?
I'm super new to TanStack Query (and SolidJS) and I have a question!
If I have an async resource on which I'd like to build a query on, as it can be mutated. Basically it's a WASM binding from which I can get some settings from and update the settings. Seems like a perfect fit for the library using queries and mutations, even though it's not a real network resource, but it behaves almost the same as a
So, there's
How would I go about creating a query for it? I've tried using:
However I don't get any console logs. I guess that the
However, If I place the
If I have an async resource on which I'd like to build a query on, as it can be mutated. Basically it's a WASM binding from which I can get some settings from and update the settings. Seems like a perfect fit for the library using queries and mutations, even though it's not a real network resource, but it behaves almost the same as a
GET and POST.So, there's
wasmResource which is a SolidJS resource wrapper around the wasm object. wasmResource.currentSettings is an async method which returns a JS object from C++ land once resolved.How would I go about creating a query for it? I've tried using:
However I don't get any console logs. I guess that the
query isn't reactive. I also get an error:However, If I place the
query inside JSX, I also get the error message but it re-renders once I refocus the window and it refetches.