Svelte · Junior · Question 33 of 76

Should a component mutate a prop object it received (not marked $bindable)?

Explanation

Mutating someone else's state makes data flow hard to follow. Let the owner change it.

Further reading

Problem with a question

Svelte · Junior · question 33

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