use-app-events
v1.4.1
Published
Global communication between components, hooks and tabs in React.
Downloads
1,099
Maintainers
Readme
use-app-events
Global communication between components, hooks and tabs in React.
🌍 Organize and manage your global app state via hooks and events.
✉️ Send events with a payload from one component, hook or tab to another.
📩 Listen for events of a specific type to occur and process the received payload.
Install
npm
npm install use-app-events
pnpm
pnpm add use-app-events
Exports
- useAppEvents
- Hook for managing application events.
- notifyEventListeners
- Function to notify all listeners of the specified event type subscribed via
listenForEvents
.
- Function to notify all listeners of the specified event type subscribed via
- listenForEvents
- Function to subscribe and listen for the specified event type(s) to occur in the app.
- heap
- (readonly) Collection of resources operated by the package.
- options
- Collection of options used to adjust the behavior of the package.
This is a truncated version of README to reduce the package size.
[ See full docs on GitHub ]
License
MIT
Author
Maksym Marchuk