Vue: Provide isn't reactive with Vuex

Created on 19 Mar 2017  路  1Comment  路  Source: vuejs/vue

I'm trying to figure out provide and inject using two components

 <div id="#app">
     <parent>
        <child>
           {{parentData}}
        </child>
     </parent>
  </div>
let Parent = Vue.extend({
      name: 'parent',
      provide() {
         return {
             parentData: [1,2,3]
         }
      },
})

let Child = Vue.extend({
      name: 'child',
      inject: ['parentData']
})

let App = new Vue({
    el: '#app'

})

but this thing doesn't work

Most helpful comment

Hello, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue - thank you!

>All comments

Hello, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue - thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertleeplummerjr picture robertleeplummerjr  路  3Comments

wufeng87 picture wufeng87  路  3Comments

franciscolourenco picture franciscolourenco  路  3Comments

aviggngyv picture aviggngyv  路  3Comments

loki0609 picture loki0609  路  3Comments