expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
9 lines (8 loc) • 429 B
TypeScript
import type { EventConsumer, EventEmitter } from './types';
export type NavigationEventEmitter<T extends Record<string, any>> = EventEmitter<T> & {
create: (target: string) => EventConsumer<T>;
};
/**
* Hook to manage the event system used by the navigator to notify screens of various events.
*/
export declare function useEventEmitter<T extends Record<string, any>>(listen?: (e: any) => void): NavigationEventEmitter<T>;