-1

I have been trying to create an entry in the browser history every time I navigate to a new page in Next.js with the Link property provided by them, but I am not able to push an entry to the browser history, so if I go back one page I am not on the page before on my application, but on the page of whatever else I visited before.

Does anyone know how to implement this functionality in Next.js? Also, I have a node back end, if that is useful in any way.

1 Answers1

0

This is probably the only way I found of creating browser history in nextjs

React & Next.js — Bug: getting previous page's value from session storage

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 25 '22 at 13:36