import history from react router code example
Example: use history in react router
import {createBrowserHistory} from 'history';import {useRouterHistory, Router, Route} from 'react-router';const history = useRouterHistory(createBrowserHistory)({ basename: '/basename'});history.listen(location => { history.push('/super/url');});const router = ( <Router history={history}> <Route path=’/' component={App}> … </Route> </Router>);