Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 4
    For pass-by-value props that is fine. In this case it's an object, so changing it will affect the parent. From that page: "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." Commented Oct 1, 2018 at 0:56
  • This works for me and is clearly documented. this line in the answer above conflicts with vue documentation as far as I can tell "Warning: this method is not recommended. It will make your components unpredictable. If you need to set parent data from child components either use state management like Vuex or use "v-model". " Commented Apr 26, 2019 at 17:32
  • 3
    So after 4 years and hundreds of hours of learning curve I'm right back where I started just bouncing vars off the window object. Commented Sep 16, 2019 at 9:21