UNPKG

expo-router

Version:

Expo Router is a file-based router for React Native and web applications.

11 lines (10 loc) • 486 B
import type { FunctionComponent, ReactElement, ReactNode } from 'react'; import type { Href } from '../types'; export type ProtectedProps = { guard: boolean; /** Where to redirect when `guard` is false. Defaults to the containing navigator's anchor. */ redirectTo?: Href; children?: ReactNode; }; export declare const Protected: FunctionComponent<ProtectedProps>; export declare function isProtectedReactElement(child: ReactNode): child is ReactElement<ProtectedProps>;