vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
http://v2.vuejs.org
MIT License
207.74k stars 33.68k forks source link

The props in a component are not watched properties to render directives #4240

Closed ArtistNeverStop closed 7 years ago

ArtistNeverStop commented 7 years ago

Vue.js version

2.0.2

Reproduction Link

Steps to reproduce

What is Expected?

What is actually happening?

ArtistNeverStop commented 7 years ago

Take the example below , The props data pretend to be part of the 'data' of every component , i assume this because you can access the props data using this.property_name, like the normal scope data AND the props will update in every change of the variable even the VueDevtools will update to the new value , but the DOM will not render the changes, i guess this happen because the props are not $watched properties , and the solution that i found is assign the props to a real $watched data property in the mounted method

posva commented 7 years ago

Please make sure to read the Issue Reporting Guidelines before opening new issues. Questions should be posted to the Gitter chat room, forum or StackOverflow. Thanks.