How to restore the page 1 scroll position after navigation to page 2

Hello I’m navigating from Page 1 to Page 2 using react-router-dom once I navigate to page one the scroll starts from starting of the scene but I want to start the scroll position where I navigated to page 2. Any ideas how we can do that?