jeudi 7 février 2019

How to deal with a warning message about prop being mutated when testing Vue.js (^2.5.*) component

I'm encountering the following error message when testing a component mounted with Vue utils:

Avoid mutating a prop directly since the value will be overwritten 
whenever the parent component re-renders. 
Instead, use a data or computed property based on the prop's value. Prop being mutated: <prop name>

Aucun commentaire:

Enregistrer un commentaire