Svelte · Senior · Question 5 of 75

What does it mean that $effect dependencies are dynamic?

$effect(() => {
  if (enabled) draw(color);
});

Explanation

This is precise and efficient, but it's also why conditionally read state may seem "not tracked".

Further reading

Problem with a question

Svelte · Senior · question 5

Test yourself

Take the Svelte · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz