UNPKG

react-stack-navigator

Version:

A native-like stack navigator for React DOM, inspired by Flutter's Navigator v1

15 lines (14 loc) 497 B
import { ReactChild } from 'react'; export interface RoutingFunctions { /** * Push a route to the stack and returns its result (if any) * @param child The route's element */ push(child: ReactChild): Promise<any>; /** * Pop the route at the top of the stack, optionally returning a result * @param result The route's result (if any) */ pop(result?: any): void; } export declare const RoutingFunctionsContext: import("react").Context<RoutingFunctions>;