DEV Community

loading...

Discussion on: “Scroll Restoration”, React Router and my custom solution for React Studyboard

Collapse
jesusramirezs profile image
jesusramirezs Author

Hi Gurupal

I preserve the scrolling state in Redux (I use it as main browser storage). In my case, a simple scrolling position (Y coordinate) would not work because content could be added and DOM elements could change in size because typography size is customizable at any moment by the user.

In your case a visibility sensor would not be needed. You know where in the page the user jumps to another page because the user just clicked on that element.