react-virtual-list
react-virtual-list copied to clipboard
Restore scroll position on navigation
What's the best way to restore scroll position on navigation back/forward with this library?
Would it be a matter of setting options.initialState.firstItemIndex
, or storing position somewhere and calling the DOM API element.scrollTo(x, y)
?
I am using React router for client-side navigation. (Their notes on scroll restoration: https://reactrouter.com/web/guides/scroll-restoration)