-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Behavior when transitioning to same path #826
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
Comments
How do you tell it creates a new entry? I click many times on current page's link in my app and I can go back in a single Back click. |
That's not what I'm observing at http://react-router-mega-demo.herokuapp.com/ with either Chrome, Firefox or IE. Are you sure you tried with HistoryLocation? |
Sorry, indeed you're right. I verified on |
@taurose Did you find a work-arround? |
I've been meaning to create a PR but haven't gotten around to it yet. I don't think there's a simple and clean way to get the always-refresh behavior. As for not creating new history entries for HistoryLocation._push = HistoryLocation.push;
HistoryLocation.push = function(path){
if(path !== HistoryLocation.getCurrentPath())
HistoryLocation._push(path);
} |
✅ Thanks @taurose, it works! |
+1 thanks for workaround in the meantime! |
I imagine we still have this issue on master |
hey guys, what about this:
I'm on react-router 1.0.0-rc3 + "history/lib/createBrowserHistory" and this problem still appears for me. |
Right now, when clicking a link to the currently active path, the browser will
On static web sites, all the browsers I tested do refresh the page, but they don't create new history entries, so I think we should do this, too. Or at least make HistoryLocation and HashLocation consistent.
The text was updated successfully, but these errors were encountered: