You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look at the console of the codesandbox to see the logs and what props has done to the props object.
Create a component, in the script tag create variable and assign an object to it, in that object specify your props. In your component options api for props, reference the variable, console log the variable and notice that vue has modified the object and added array indexes to it. Now this object is useless because it cannot be used in other components for defining props.
What is expected?
Vue not to mutate objects because this stops it being used elsewhere.
What is actually happening?
Vue is mutating an object which it shouldnt be doing
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
LinusBorg
added
🐞 bug
Something isn't working
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
and removed
🐞 bug
Something isn't working
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
labels
Oct 20, 2022
Vue version
3.2.41
Link to minimal reproduction
https://codesandbox.io/s/brave-blackburn-rpbrmo?file=/src/components/Image.vue:91-135
Steps to reproduce
Look at the console of the codesandbox to see the logs and what props has done to the props object.
Create a component, in the script tag create variable and assign an object to it, in that object specify your props. In your component options api for props, reference the variable, console log the variable and notice that vue has modified the object and added array indexes to it. Now this object is useless because it cannot be used in other components for defining props.
What is expected?
Vue not to mutate objects because this stops it being used elsewhere.
What is actually happening?
Vue is mutating an object which it shouldnt be doing
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: