@barguide/react-hooks
Version:
TypeScript | React Hooks
11 lines (9 loc) • 389 B
text/typescript
import { EventEmitter } from 'events';
/**
* @external https://nodejs.org/api/events.html
* @description Much of the Node.js core API is built around an idiomatic
* asynchronous event-driven architecture in which certain kinds of objects
* (called "emitters") emit named events that cause Function objects
* ("listeners") to be called.
*/
export const emitter = new EventEmitter();