question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

browserHistory doesn't exist in react-router

See original GitHub issue
import { browserHistory, Router, Route, IndexRoute } from 'react-router'

Shows error:

'react-router' does not contain an export named 'browserHistory'.

Here is the code Code

React version: v4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timdorrcommented, Mar 6, 2018

That is not the right version and not a package we maintain. I wouldn’t trust that. npm install react-router@3 is the correct way to install.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React router not showing browser history - Stack Overflow
This error happens simply because react-router v4 does not have the browserHistory (I don't know if that's a good thing or not though)....
Read more >
browserHistory doesn't exist in react-router #6007 - GitHub
You have to install v3 of react-router. You have the wrong version installed.
Read more >
Tutorial v6.6.1 - React Router
First thing to do is create a Browser Router and configure our first route. This will enable client side routing for our web...
Read more >
The React Router Cheatsheet – Everything You Need to Know
Once it's installed, we can bring in our first component which is required to use React router which is called BrowserRouter. Note that...
Read more >
React Router DOM: How to handle routing in web apps
hash). If you're going to target older browsers that don't support the HTML5 History API, you should stick with <HashRouter> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found