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
Adds a React-specific `useFlushSync` option to control whether `flushSync` is used for synchronous scroll correction during measurement.
8
+
9
+
The default behavior remains unchanged (`useFlushSync: true`) to preserve the best scrolling experience.
10
+
Disabling it avoids the React 19 warning about calling `flushSync` during render, at the cost of potentially increased visible whitespace during fast scrolling with dynamically sized items.
flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.
60
+
```
61
+
Setting `useFlushSync: false` will eliminate this warning by allowing React to batch updates naturally.
62
+
- **Performance optimization**: If you experience performance issues with rapid scrolling on lower-end devices
63
+
- **Testing environments**: When running tests that don't require synchronous DOM updates
64
+
- **Non-critical lists**: When slight visual delays during scrolling are acceptable for better overall performance
0 commit comments