Reputation: 1188
I have two component for example Login.vue
and Header.vue
. I want to set data value of header.vue
after some action in login.vue
. how can i do so?I am using vue cli.
Upvotes: 0
Views: 421
Reputation: 1355
If your Login Component is a child of your header, then your Login can emit an event. See here.
If not, then your components can exchange data via a Global Event Bus or a global store Vuex.
Also take a look here on cross component communication.
Upvotes: 2