react-router icon indicating copy to clipboard operation
react-router copied to clipboard

[Bug]: `revalidate` (from `useRevalidator` hook) causes page twitching effect while scrolling the page with `<ScrollRestoration />` component

Open DimaAmega opened this issue 4 months ago • 2 comments

What version of React Router are you using?

6.27.0

Steps to Reproduce

Actually i was trying to setup page with long table (like scrollable page) that constantly refresh data from loader every n ms/s by calling revalidate(). It works, but using revalidate with <ScrollRestoration /> while scrolling the page causes page twitching. Without <ScrollRestoration /> component on the page everything is working fine, so i believe this is the bug

Minimal example here: https://stackblitz.com/edit/vitejs-vite-go7kak?file=src%2Fmain.tsx

Expected Behavior

https://github.com/user-attachments/assets/e89b2b38-aa3a-4799-abb8-c3a5dd53d7b2

Actual Behavior

https://github.com/user-attachments/assets/d3396ba7-6f7b-4314-b301-bf285078ab7d

DimaAmega avatar Oct 18 '24 18:10 DimaAmega