How do I get a boolean authenticated on the main instance in vue.js 2.0?
Right now I've got this:
const app = new Vue({
router,
render: h => h(App)
}).$mount('#app');
Then in my App component:
data() {
return {
authenticated: false
}
}
But it's not set on the Root component. So I cannot access it through:
{{ this.$root.authenticated }}
In my childcomponents (for example Navigation). How can I fix this. In vue.js 1.0 this was working!

user namethat's on a user object on mymain app.vueinstance in thenavbar. I really need to solve this.componentwithin acomponent. So then I've to pass apropfrom one component to the other and that component will pass it to another component. That's not how I would like to do it :)