expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
21 lines (20 loc) • 1.13 kB
TypeScript
import * as React from 'react';
import type { NavigationAction, NavigationState, ParamListBase, PartialState, Route } from '../routers';
import type { NavigationProp, RouteConfigComponent } from './types';
type Props<State extends NavigationState, ScreenOptions extends object> = {
screen: RouteConfigComponent<ParamListBase, string> & {
name: string;
};
navigation: NavigationProp<ParamListBase, string, string | undefined, State, ScreenOptions>;
route: Route<string>;
routeState: NavigationState | PartialState<NavigationState> | undefined;
options: object;
clearOptions: () => void;
emitRemovalEvent: (routeKey: string, type: 'removePrevented' | 'removed', action: NavigationAction) => void;
};
/**
* Component which takes care of rendering the screen for a route.
* It provides all required contexts and applies optimizations when applicable.
*/
export declare function SceneView<State extends NavigationState, ScreenOptions extends object>({ screen, route, navigation, routeState, options, clearOptions, emitRemovalEvent, }: Props<State, ScreenOptions>): React.JSX.Element;
export {};