Deviopath › Next.js

Back Button

Easy · Navigation

Besides push, the router from useRouter() has router.back(), which goes to the previous page in the browser history (like the browser's back button).

The page has a See details link to /details. Make the Back button call router.back().

Next: Product Images