UNPKG

1.06 kBTypeScriptView Raw
1/// <reference types="react" />
2import type { NavigationState, ParamListBase, PartialState, Route } from '@react-navigation/routers';
3import type { NavigationProp, RouteConfigComponent } from './types';
4declare type Props<State extends NavigationState, ScreenOptions extends {}> = {
5 screen: RouteConfigComponent<ParamListBase, string> & {
6 name: string;
7 };
8 navigation: NavigationProp<ParamListBase, string, State, ScreenOptions>;
9 route: Route<string>;
10 routeState: NavigationState | PartialState<NavigationState> | undefined;
11 getState: () => State;
12 setState: (state: State) => void;
13 options: object;
14 clearOptions: () => void;
15};
16/**
17 * Component which takes care of rendering the screen for a route.
18 * It provides all required contexts and applies optimizations when applicable.
19 */
20export default function SceneView<State extends NavigationState, ScreenOptions extends {}>({ screen, route, navigation, routeState, getState, setState, options, clearOptions, }: Props<State, ScreenOptions>): JSX.Element;
21export {};