Skip to content
Discussion options

You must be logged in to vote

Effects only run when read signals change. Your demo only reads the top-level signal. In the effect, read the entire tree like this:

$state.snapshot(file_tree);

If you want to know in more detail how effects work, read my blog article: Svelte Reactivity: Let's Talk About $Effects

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Keshav-writes-code
Comment options

Answer selected by Keshav-writes-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants