Go back/forward #181
Replies: 6 comments 4 replies
-
Of course I found my answer right after posting this. |
Beta Was this translation helpful? Give feedback.
-
Late 2023 answer: const router = useRouter();
const onBack = () => router.history.back(); |
Beta Was this translation helpful? Give feedback.
-
Any update on this? I would like to able to navigate back only in the scope of app routing and don't go back to the page I was before I came to this app. |
Beta Was this translation helpful? Give feedback.
-
Such a basic thing should be in the docs |
Beta Was this translation helpful? Give feedback.
-
I used it like this : const { history } = useRouter()
onClick={() => history.go(-1)} |
Beta Was this translation helpful? Give feedback.
-
None of the proposed solutions allow app back/forward navigation without a page reload. Would be very nice to have this feature. |
Beta Was this translation helpful? Give feedback.
-
In react-router you have the ability to do
history.goBack
. I have combed through the docs and have not found a way to do this in react-location. What is the best way to accomplish this?Beta Was this translation helpful? Give feedback.
All reactions