0.14.0 • Published 4 years ago

@terra-dev/event-bus v0.14.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

@terra-dev/event-bus

Simple React context API based Event Bus library.

Usage

// Setup
import { EventBusProvider } from '@terra-dev/event-bus';

<EventBusProvider>
  <YourApp />
</EventBusProvider>;
// Dispatch
const { dispatch } from '@terra-dev/event-bus'

<button onClick={() => dispatch('some-event')}>
  Dispatch Event
</button>
// Listen
const { useEventBusListener } from '@terra-dev/event-bus'

useEventBusListener('some-event', () => {
  // DO SOMETHING
})
0.14.0

4 years ago

0.13.0

4 years ago

0.13.1

4 years ago

0.12.2

4 years ago

0.10.0

4 years ago

0.11.0

4 years ago

0.10.1

4 years ago

0.12.0

4 years ago

0.10.2

4 years ago

0.8.0

4 years ago

0.12.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago