use-app-events
Version:
Create custom events and reactive variables in vanilla JavaScript and React.
13 lines (12 loc) • 625 B
TypeScript
type UseAppEventsProps = {
/** When true, enables a debug mode, resulting in additional logs in non-production environment. */
debug?: boolean;
};
/** Hook for managing application events. */
declare const useAppEvents: <EventType extends string>(props?: UseAppEventsProps) => {
listenForEvents: import('../../base/listenForEvents/types').BaseListenForEvents<EventType> & {
once: import('../../base/listenForEvents/types').BaseListenForEvents<EventType>;
};
notifyEventListeners: import('../../base/notifyEventListeners/types').BaseNotifyEventListeners<EventType>;
};
export default useAppEvents;