You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Flickering of elements on scroll, seemingly related to element size measurement. Debugger shows Layout Shift warning. Setting the measurement via the itemSize prop to return a constant does fix the issue, but obviously breaks other things. Upgrading to React 18 solves the issue, which we did as our solution.
Just reporting as a courtesy for anyone else having a similar issue. Thank you @petyosi for your work.
Thanks for sharing that @wjkmartin - it's interesting as I've spent a lot of time eliminating flickering in React 18 :).
The effect in your example is certainly visible, especially due to the different background of the items. Another way to mitigate the flickering would be increasing the viewport, so that the items have more time to render before the user scrolls up to them:
Describe the bug
Flickering of elements on scroll, seemingly related to element size measurement. Debugger shows Layout Shift warning. Setting the measurement via the
itemSize
prop to return a constant does fix the issue, but obviously breaks other things. Upgrading to React 18 solves the issue, which we did as our solution.Just reporting as a courtesy for anyone else having a similar issue. Thank you @petyosi for your work.
Reproduction
https://codesandbox.io/s/currying-meadow-fjr3pb?file=/package.json
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: