-
Hey all, I'm spinning my tires out here in struggle city tonight trying to figure this out. In React, if a parameter that is passed into Here's a quick codesandbox I whipped up demonstrating this use case: The header links go to the following pages:
Are there patterns for achieving reactive queries that also leverage cache? Any insight @lachlancollins ? EDIT: For typescript, I landed on something like this where I shove everything into a custom hook: The gotcha is, svelte doesn't re-render when |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
After poking at this awhile in codesandbox, declaring |
Beta Was this translation helpful? Give feedback.
-
Hello having the same issue with svelte 5. It seems $derived.by does not solve this case. |
Beta Was this translation helpful? Give feedback.
After poking at this awhile in codesandbox, declaring
createQuery
in a reactive declaration seems to be sufficient. Whatever issue I'm having locally isn't reproducible in codesandbox andsvelte-query
is working as intended.