query
query copied to clipboard
fix(svelte-query): fix error when creating query outside of component
Description
This fixes an effect_orphan error that occurs, when createQuery gets called in an event listener, or simply outside of component initialization.
I simply added $effect.root around the $effects in createBaseQuery.svelte.ts which fixed the error on my end while seemingly not breaking anything.