3 ms·
Rule of thumb is: it's fired after assignment of a named variable from the root scope which was mentioned in this reactive block. You can even add a line that
by Tade0 4y ago
Rule of thumb is: it's fired after assignment of a named variable from the root scope which was mentioned in this reactive block.
You can even add a line that just says `myVar;` and the reactive block containing it will be executed on every `myVar = ...`.
- 7sidedmarble 4y agoYeah I understand why people find them confusing. They trip me up too, and I write a lot of Svelte. I think it would have been better if Rich had added something like the computed/useEffect style of this concept, but it would have looked very out of place in the rest of Svelte which is probably why he didn't do it.