How can I simulate pressing the "back" button in the browser from the code?
const history = useHistory()
history.goBack()
I know I can do this as well, but as I understood in the new versions of react-router-dom useHistory was changed to useNavigate, which has no goBack() function. How can I go back to the last page without rolling back react-router-dom?