Closed jhwz closed 9 hours ago
$effect.root
creates a new root context, but doesn itself rerun. You need to put an $effect
inside: https://svelte.dev/playground/f4917869686e4d78901a3b3d3fd0a617?version=5.5.3#H4sIAAAAAAAACnVQ206DQBD9lXHSpJASsK8IJL75D65J6TJt0WWXsEOt2ey_m4Walqiv5zZzjkNdd4Q5vpBSBj7NoBqIqGmZmhgTPLSKLOavDvmrD7oAYPLjeu771J5JccD2taW_cGk0k2aLORZWDm3PldCC2643A4OTZtTs4TCYDgSmGZPlqzl9twKDVhFDiIYS1tOP6yehi-yWpovTtpo7uCD0D0V22s7MfmQ2GoyWqpUfpYtiKCuYzqbnWo202fiq1XKgjjTPRJHNrinB3Wm90Jgg04Ux52Ekn_wzzbLGcp5f3N1EdJlmCY2ns1DCynLNFLnpgRweffwU3lrR4UCS08EYjuZSLox1xW-QNNoaRakyx2g3h8pTrY_U5LBalNvFIUCwj4X28bLom_8GFpe6_C0CAAA=
My mistake sorry! That went straight over my head when reading the docs 😅
Describe the bug
When I have an
$effect.root
in a.svelte.js/ts
file, that effect doesn't appear to properly fire when dependant state changes.Reproduction
https://svelte.dev/playground/f4917869686e4d78901a3b3d3fd0a617?version=5.5.3
Would expect to see the
console.log
firingLogs
No response
System Info
Severity
annoyance