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

10 lines (9 loc) 534 B
import * as React from 'react'; import { BrowserHistory, HashHistory, MemoryHistory } from 'history'; interface IHistoryContextProps { children: React.ReactNode; history: BrowserHistory | MemoryHistory | HashHistory; } export declare const HistoryContext: ({ children, history, }: IHistoryContextProps) => JSX.Element; export declare const useHistoryContext: () => BrowserHistory<import("history").State> | MemoryHistory<import("history").State> | HashHistory<import("history").State>; export default HistoryContext;