Description
The problem
For parity with react-native, the latest VirtualizedList
is expected to be able to produce the following output:
VirtualizedLists should never be nested inside plain ScrollViews with the same
orientation because it can break windowing and other functionality - use another
VirtualizedList-backed container instead.
How to reproduce
Put a vertical FlatList inside a vertical ScrollView and run the app.
Or simply view the upcoming code for the latest vendor source files for VirtualizedList\index.js which cites this ticket number.
Expected behavior
Produces the console.error output about incorrect nesting.
Environment (include versions). Did this work in previous versions?
No, this is new behavior for react-native that just hasn't made it into react-native-web yet due to merge complications.
- React Native for Web (version): TBC
- React (version): TBC
- Browser: TBC
Additional context
This bug is being pre-created in preparation to cite inside the code itself with a TODO
marker.
The updates to VirtualizedList are in the process of migrating to react-native-web, but the __DEV__
-only code which normally produces this output relies on a ScrollView.Context.Consumer
which is simply not available yet. To limit the scope of the vendor files update, this ticket serves as a placeholder for finishing bringing this new react-native feature to react-native-web.