1 | import type { NavigationAction, NavigationState, Router } from '@react-navigation/routers';
|
2 | declare type Options<Action extends NavigationAction> = {
|
3 | router: Router<NavigationState, Action>;
|
4 | getState: () => NavigationState;
|
5 | setState: (state: NavigationState) => void;
|
6 | key?: string;
|
7 | };
|
8 | /**
|
9 | * Hook to handle focus actions for a route.
|
10 | * Focus action needs to be treated specially, coz when a nested route is focused,
|
11 | * the parent navigators also needs to be focused.
|
12 | */
|
13 | export default function useOnRouteFocus<Action extends NavigationAction>({ router, getState, key: sourceRouteKey, setState, }: Options<Action>): (key: string) => void;
|
14 | export {};
|