I keep getting this error message:‘react-router’ does not contain an export named ‘browserHistory’. any solutions?
I solved the issue by installing v3 like this: npm install react-router@3 --save
v-lai
September 22, 2017, 7:14pm
3
# Migrating from v2/v3 to v4
React Router v4 is a complete rewrite, so there is not a simple migration path. This guide will provide you with a number of steps to help you understand how to upgrade your application.
**Note:** This migration guide is for both React Router v2 and v3, but for brevity, references to previous versions will only mention v3.
* [The Router](#the-router)
* [Routes](#routes)
* [Nesting Routes](#nesting-routes)
* [on* properties](#on-properties)
* [Switch](#switch)
* [Redirect](#redirect)
* [PatternUtils](#patternutils)
* [Link](#link)
## The Router
In React Router v3, there was a single `<Router>` component. It would be provided a `history` object as a prop.
Also, you would provide it your application's route configuration to the `<Router>` either using the `routes` prop or as the `children` of the `<Router>`.
This file has been truncated. show original
In v4 You would need to import BrowserRouter from ‘react-router-dom’. If you’re creating something new, it’s probably a good idea to try to use the latest version.