So the problem was that when i tried to go back using browser native back, as well as history.back(), history.push() and history.replace() button it took me to the wrong path, so instead of going to the previous page i'd gotten into previous website, like completely different one.
history.back(), history.push()
history.replace()
To navigate through the pages i was using useHistory hook.
So to do this you'd need to pass optional argument of state into the function call so that
history.replace('some-url')
will be changed to, for me at least
history.reaplce('some-url', '/')
2.1m questions
2.1m answers
60 comments
57.0k users