meteor-vue / vue-meteor-tracker

Use Meteor Tracker reactivity inside Vue components
90 stars 20 forks source link

Data passed as props to component is not reactive #36

Closed vilipwong closed 6 years ago

vilipwong commented 6 years ago

Version: 2.0.0-beta.3 Vue version: 2.5.16, OS: Ubuntu, Browser: Chrome

I noticed that data passed as props to child component is not reactive.

According to doc: All props form a one-way-down binding between the child property and the parent one: when the parent property updates, it will flow down to the child

Example:

Data will populate after meteor subscription finish

{{dataFromSubs}}
<my-component v-bind:msg="dataFromSubs"></my-component>

But in props, the changes are not reflecting

props:['dataFromSubs'],
  template: '<h1>{{dataFromSubs}}</h1>',