React page resumes scrolling

problem description

The

A page has a long list with many items. Clicking on an item will jump to the B page to view the details, and then return to the A page and then pull the data to render again. At this time, the A page goes back to the top, so it is very embarrassing. I have slipped down the long list on page A, and I have to find the one I looked at before. so the question is, how to record the scrolling position before leaving page A?. Then, after returning to page A, restore the scroll position

try

at first it was supposed to be stored in redux, but what if there are a lot of pages that need to record where to scroll? Give up.
then thought of routing hooks, but routerv4 didn"t.
then. This is it.

clipboard.png

I don"t have a clue right now. I hope I can give you some direction. It"s best not to introduce other packages

.
Apr.16,2021

routerRedux.goBack ()
can't this


sessionStorage learn

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40dc7-2c54f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40dc7-2c54f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?