0.14.0 • Published 3 years ago

@terra-dev/event-bus v0.14.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 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

3 years ago

0.13.0

3 years ago

0.13.1

3 years ago

0.12.2

3 years ago

0.10.0

3 years ago

0.11.0

3 years ago

0.10.1

3 years ago

0.12.0

3 years ago

0.10.2

3 years ago

0.8.0

3 years ago

0.12.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago