Skip to content
This repository has been archived by the owner on May 3, 2018. It is now read-only.

Passing events between sibling components #190

Open
slickorange opened this issue Jun 13, 2015 · 3 comments
Open

Passing events between sibling components #190

slickorange opened this issue Jun 13, 2015 · 3 comments

Comments

@slickorange
Copy link

Hi,

While the docs are pretty clear on passing data with events between parent and child components I am unsure on how to pass it between "sibling" components.

Currently I am using $dispatch on the on child. I the dispatched event in the parent and then I $broadcast the event again and catch it by the other child... It feels like there should be a better way?

@slickorange slickorange changed the title Passing events between sibling componentsw Passing events between sibling components Jun 13, 2015
@yyx990803
Copy link
Member

In this case you should probably use an event bus that is outside of the component tree. You don't always have to rely on the propagation.

@leapon
Copy link

leapon commented May 31, 2016

@yyx990803 The "event bus" you are referring to is VueX?

@yyx990803
Copy link
Member

@leapon vuejs/vue#2873 seach for "Upgrade Tips"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants