You’re doing a few things wrong.
- First, browserHistory isn’t a thing in V4, so you can remove that.
- Second, you’re importing everything from
react-router
, it should bereact-router-dom
. - Third,
react-router-dom
doesn’t export aRouter
, instead, it exports aBrowserRouter
so you need toimport { BrowserRouter as Router } from 'react-router-dom
.
Looks like you just took your V3 app and expected it to work with v4, which isn’t a great idea.