router
router copied to clipboard
`<ScrollRestoration />` does not restore the scroll positions before DOM paint
Which project does this relate to?
Router
Describe the bug
It shows the top of the page then restore the scroll positions. This causes flickering.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-k6ncqr?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
- At the
/route (Home tab), scroll to the bottom of the home tab. - Click the About tab.
- Click the Home tab.
- I can see the red background of the Home tab title appear and then suddenly disappeared.
Expected behavior
No red background flickering
Screenshots or Videos
https://github.com/user-attachments/assets/22f05924-bb58-4894-9938-5a7903b51db4
Platform
- OS: WInd
- Browser: Edge
- Version: 130.0.2849.46
Additional context
No response