Svelte · Junior · Question 63 of 76

What does {#key value} do?

Explanation

Useful to replay a transition on change. It is expensive, so don't use it just to re-run logic; $derived is usually better.

Further reading

Problem with a question

Svelte · Junior · question 63

Test yourself

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

Take this quiz