How to link components and access data. In the project I use vue-route. The structure is such
component
a.vue
b.vue
c.vue
app.vue
main.js
I use es6 to bind
import Vue from 'vue' import VueRouter from 'vue-router' import app from './app.vue' app.vue gets data to which you need to have access to other components. According to the documentation, access to them must be obtained through props What I'm trying to do. The app.vue component displays part of the template and receives data. The a.vue component is accessible via the route '/' connect the app.vue component to a.vue to access its data .
import app from './../app.vue'; export default { component: { app }, props: ['item', 'settings'] } But in props I have undefined . In app.vue data comes in and there is data in place. I have a suspicion that I do not correctly bind the components, and a.vue does not know where to get the data.
Ps I hope I was able to state the essence of the problem.