connected-react-router
connected-react-router copied to clipboard
`history.replace` is not working after upgrading to 6.9.2 version
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:
- the user is on page
/page1
; - then he clicked some button and he is redirected to
/page2
url; - on that
/page2
page there is someuseEffect
that must replace the current url to/page3
,useEffect(() => history.replace('/page3'), [])
; - user is redirected to
/page3
url; - 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.
@Pareder by any chance did you find the culprit version with the problem? Trying to decide how I should roll back.