Replies: 1 comment 6 replies
-
|
There is no real right or wrong answer, as long as it works. If you just need to pass read-only reactivity, I would use a regular function. You also don't need const query = createQuery(() => item);(See also the docs on passing state to functions.) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the right approach to extract some code from a component into a another module (.svelte.ts)?
Ideally I would want to write the following but it loses reactivity...
Some options...
a.
b.
c.
Beta Was this translation helpful? Give feedback.
All reactions