DEV Community

Discussion on: TIL - Vue.js Event Bus more clearly

Collapse
 
dayvidwhy profile image
David Young

You can even use this technique while still making use of Vuex.

I like it the most when I want to avoid storing extra stuff in state, like having some vue instance commit a flag, that another vue instance is watching. That would be like a vue1 -> state -> vue2 pathway.

I can instead just use the EventBus as like a side passage, just emit from 1 vue component and listen to it in the other one so I'm instead going vue1 -> EventBus -> vue2.