Open tjdud0123 opened 4 years ago
object / array reference로 넘어감 ->주의
Note that objects and arrays in JavaScript are passed by reference, so if the prop is an array or object, mutating the object or array itself inside the child component will affect parent state.
관련 에러 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. 참고 https://vuejs.org/v2/guide/components-props.html?#One-Way-Data-Flow