react-navi
Version:
A batteries-included router for react.
26 lines (25 loc) • 990 B
TypeScript
import * as React from 'react';
import { Navigation, Subscription, Route } from 'navi';
import { HashScrollBehavior } from './HashScroll';
import { NaviContext } from './NaviContext';
export interface NaviProviderProps {
hashScrollBehavior?: HashScrollBehavior;
navigation: Navigation;
children?: React.ReactNode | undefined;
}
export declare namespace NaviProvider {
type Props = NaviProviderProps;
}
export declare class NaviProvider extends React.Component<NaviProviderProps, NaviContext> {
subscription?: Subscription;
static getDerivedStateFromProps(props: NaviProviderProps, state: NaviContext): NaviContext | null;
constructor(props: NaviProviderProps);
render(): JSX.Element;
componentDidMount(): void;
componentDidUpdate(prevProps: NaviProviderProps): void;
componentWillUnmount(): void;
subscribe(): void;
unsubscribe(): void;
handleNavigationSnapshot: (route: Route<any>) => void;
handleError: (error: any) => never;
}