Svelte · Junior · Question 36 of 76

When does onMount run?

Explanation

A function returned from onMount runs when the component is destroyed. It doesn't run during SSR.

Further reading

Problem with a question

Svelte · Junior · question 36

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