Skip to content

ddesilva/react-event-bus

Repository files navigation

react-event-bus

Cross component/app comms using a pub/sub pattern.

Good for:

  • UI interactions / Updates
  • Avoiding prop drilling
  • Avoiding managing state yourself
  • Communicating with 3rd party components
  • Optimistic updates
// Target is optional if you want to do cross app comms. Will either create or use target at window[target]
 <EventProvider target={'od_events'}>
  <ComponentOne />
  <ComponentTwo />
  <ComponentThree />
</EventProvider>

See /examples folder for working example.

About

Cross component comms using a pub/sub pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •