UNPKG

react-history-switch

Version:

Self-hosted context-free Switch routing component for History.js library (React). The library was created to transfer navigation responsibility from a view into Mobx state container (MVC). Also can be used separately as a self-hosted router

17 lines (16 loc) 601 B
/// <reference types="react" /> import { BrowserHistory, MemoryHistory, HashHistory } from 'history'; import ISwitchItem from './ISwitchItem'; export interface ISwitchProps { items: ISwitchItem[]; fallback?: (e: Error) => void; history?: BrowserHistory | MemoryHistory | HashHistory; Forbidden?: React.ComponentType<any>; NotFound?: React.ComponentType<any>; Loader?: React.ComponentType<any>; Error?: React.ComponentType<any>; onLoadStart?: () => void; onLoadEnd?: (isOk?: boolean) => void; throwError?: boolean; } export default ISwitchProps;