Answer the question
In order to leave comments, you need to log in
How to add an entry to an object that is in props?
Through props, I added an object to the component. The code is like this:
export default {
props: [
'object'
],
}
Answer the question
In order to leave comments, you need to log in
this.object.foo = bar
?
In general, a warning should fall due to the fact that it is not recommended to change props.
I think it would be optimal to initialize the local property of the component with the value from props and then work with the local property.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question