I'm initializing my app with main.js like so,
import App from './App.vue';
const store = {
items: [{
todo: 'Clean Apartment.',
},{
todo: 'Mow the lawn!',
},{
todo: 'Pick up eggs, milk & flour',
}, {
todo: 'Watch the big game',
}],
};
const app = new Vue({
el: '#app-zone',
data: store, // is this not sending the store data into App.vue?
render: h => h(App),
});
I'm trying to make use of items within App.vue. But I'm not sure how or if it's passed down into it.
App.vue looks like so...
export default {
props['items'], // not sure if that's correct
created() {
console.log(this.items); // always returns undefined
}
}
So how do I get data from the constructor and make use of it? Thank you for your help!