JSPM

react-use-eventbus-z

1.0.0-vz
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q24094F
  • License MIT

React wrap use eventbus

Package Exports

  • react-use-eventbus-z
  • react-use-eventbus-z/build/index.esm.js
  • react-use-eventbus-z/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-use-eventbus-z) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-use-eventbus-z

react-use-eventbus-z

LIVE EXAMPLE

Description


Usage

Install the package

npm install --save react-use-eventbus-z

Import the module in the place you want to use:

import { useEventBusOn, WrapEventBus } from 'react-use-eventbus-z';

Snippet

    import { useEventBusOn, WrapEventBus } from 'react-use-eventbus-z';

    const App = () => {
        useEventBusOn('NAME', (abc, def) => {
            alert('abcd');
        })
        return <Child />;
    }

    const Child = () => {
        return <button onClick={() => WrapEventBus.sendEvent('NAME', 'abc', 1234)}>Abcd</button>
    }


Events

See eventbus-z

RUN

LIVE EXAMPLE


License

MIT