Skip to content

API Reference / @gtkx/navigation / EventConsumer

Type Alias: EventConsumer<EventMap> ​

EventConsumer<EventMap> = object

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_patch_hash=6462da01ed23beee88f01d290d3714743e43d2fd84235198fcbe09501a61d1d4_react@19.2.8/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts:227

Type Parameters ​

EventMap ​

EventMap extends EventMapBase

Methods ​

addListener() ​

addListener<EventName>(type, callback): () => void

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_patch_hash=6462da01ed23beee88f01d290d3714743e43d2fd84235198fcbe09501a61d1d4_react@19.2.8/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts:234

Subscribe to events from the parent navigator.

Type Parameters ​

EventName ​

EventName extends string

Parameters ​

type ​

EventName

Type of the event (e.g. focus, blur)

callback ​

EventListenerCallback<EventMap, EventName>

Callback listener which is executed upon receiving the event.

Returns ​

() => void


removeListener() ​

removeListener<EventName>(type, callback): void

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_patch_hash=6462da01ed23beee88f01d290d3714743e43d2fd84235198fcbe09501a61d1d4_react@19.2.8/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts:235

Type Parameters ​

EventName ​

EventName extends string

Parameters ​

type ​

EventName

callback ​

EventListenerCallback<EventMap, EventName>

Returns ​

void