Instead of using the BrowserRouter component from react-router-dom, we now need to use the ConnectedRouter component from react-router-redux. This component also requires us to pass a history property, which means we need to import that from our middleware.js file. Perfom the following steps:
- Edit src/components/App.jsx and adjust the import statement from react-router-dom, remove the BrowserRouter as Router part:
import { Route } from 'react-router-dom'
- Import the ConnectedRouter component from react-router-redux:
import { ConnectedRouter } from 'react-router-redux'
- Import the history object:
import { history } from '../store/middleware'
- Replace the Router component with ConnectedRouter and pass the history ...