react-virtuoso: [BUG] Maximum call stack size exceeded since v4.3.11
Describe the bug
When scrolling in a React Virtuoso it may throw the Maximum call stack size exceeded error.
Reproduction See https://codesandbox.io/s/gifted-silence-m4h479 for reproduction
To Reproduce
- Go to the code sandbox
- In the list on the right scroll down and up (using the scrollbar for faster scrolling) frenetically.
- The error appears
Expected behavior No error should be throw.
Screenshots
Desktop (please complete the following information):
- OS: Linux - Fedora Linux 38 (Workstation Edition) and Windows 10
- Browser: Reproduced on Chromium Version 114.0.5735.198 (Official Build) Fedora Project (64-bit) AND various users Chrome version (I don’t know exactly the version number)
Additional context
I don’t know if it may matters but my guess is that the issue seems to appears when we change the overscan value.
Indeed removing it from the sandbox and the list no longer crash. In the context of our application the overscan value is equal to the number of element that would be added to the list once the end of the list is reached.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 18 (11 by maintainers)
Use the workaround from https://github.com/petyosi/react-virtuoso/issues/946#issuecomment-1869492230.