Skip to content

Svelte 5: $Effect runes can trigger themselves. Is this intended or an issue? #11551

Answered by brunnerh
JacobSilasBentley asked this question in Q&A
Discussion options

You must be logged in to vote

This is intended.

You generally should avoid setting $state in an effect (as pointed out in the docs).

Not every $: is an effect, many should become $derived instead.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gterras
Comment options

@brunnerh
Comment options

@gterras
Comment options

@JacobSilasBentley
Comment options

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