Svelte · Middle · Question 6 of 75

What is the difference between $effect and $effect.pre?

Explanation

$effect.pre replaces beforeUpdate from Svelte 4, and $effect replaces afterUpdate.

Further reading

Problem with a question

Svelte · Middle · question 6

Test yourself

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

Take this quiz