use-event-subscribe
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

useEventSubscribe react hook

npm

A React Hook to subscribe to an event.


Installation


Installation

$ yarn add use-event-subscribe

Import

import useEventSubscribe from 'use-event-subscribe';

Usage

useEventSubscribe('eventName', ({detail}) => {
  /* code here */
})

Package Sidebar

Install

npm i use-event-subscribe

Weekly Downloads

1

Version

1.0.0

License

GPL-3.0-or-later

Unpacked Size

36.6 kB

Total Files

7

Last publish

Collaborators

  • baristna