Skip to content
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

history.replace is not working after upgrading to 6.9.2 version #572

Open
Pareder opened this issue May 17, 2022 · 1 comment
Open

history.replace is not working after upgrading to 6.9.2 version #572

Pareder opened this issue May 17, 2022 · 1 comment

Comments

@Pareder
Copy link

Pareder commented May 17, 2022

After upgrading from 6.6.1 to 6.9.2 version I have found bugs in my application that calling history.replace does not replace the current url, but acting like push, I mean it stores the previously stored path in history. So clicking back button in browser does not skip this replaced path. For example:

  1. the user is on page /page1;
  2. then he clicked some button and he is redirected to /page2 url;
  3. on that /page2 page there is some useEffect that must replace the current url to /page3, useEffect(() => history.replace('/page3'), []);
  4. user is redirected to /page3 url;
  5. when clicking browser back button he is redirected to /page2 but he must be redirected to /page1, that's how replace should work and previously worked.

I did not change any code, just upgraded this package.

@kylemh
Copy link

kylemh commented Sep 23, 2022

@Pareder by any chance did you find the culprit version with the problem? Trying to decide how I should roll back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants