Vue · Junior · Question 29 of 75

Why shouldn't a child mutate a prop?

Explanation

If the child needs to change the value, emit an event so the parent updates it, or copy the prop into local state if it's only an initial value.

Further reading

Problem with a question

Vue · Junior · question 29

Test yourself

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

Take this quiz