Skip to content

Mismatching of rendered handler and corresponding path #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
th0r opened this issue Mar 31, 2015 · 3 comments
Closed

Mismatching of rendered handler and corresponding path #1027

th0r opened this issue Mar 31, 2015 · 3 comments

Comments

@th0r
Copy link

th0r commented Mar 31, 2015

I've made the reproduction repo: https://github.com/th0r/react-router-bug
Clone it, run npm i && npm start, open browser console, go to http://localhost:8080/a do the following:

  1. Click To B link
  2. Click To A link
  3. Quickly press browser's back button twice

Result: current location is http://localhost:8080/a, but the text on page is B component (route handler for path /b).

@agundermann
Copy link
Contributor

Thanks. Can reproduce.

As far as I can tell, the problem is that when quickly going A->B->A the router skips the dispatch and thus the run callback of the last A, since A is still the currently rendered path.

@gaearon
Copy link
Contributor

gaearon commented Apr 1, 2015

Good one. I've had this in production but wasn't sure if it's a bug in router or my app.

@ryanflorence
Copy link
Member

closing, follow #1031

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants