import { History } from 'history' ; import React from 'react' ; import { Router as ReactRouter } from 'react-router-dom' ; import { Route , Router } from './types' ; import { RouterContextProvider } from './use_router' ; export function RouterProvider ( { children , router , history , } ) { return ( < ReactRouter history = { history } > < RouterContextProvider router = { router } > { children } < /RouterContextProvider> < /ReactRouter>); }