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_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_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_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

Released under the MPL-2.0 License.