Files
react-native/Libraries
Nick Gerleman 04e43544b8 Allow VirtualizedListContext to support different component type
Summary:
This change is in preparation of adding a separate `VirtualizedList_EXPERIMENTAL` component.

Both the original, and experimental lists use `VirtualizedListContext`, which itself references back to the VirtualizedList class type. VirtualizedList private methods are currently included in the type system, and are called in other VirtualizedList code (see https://github.com/facebook/react-native/commit/b2f871a6fa9c92dd0712055384b9eca6d828e37d). This prevents Flow from seeing the two classes are compatible if "private" methods change.

My first attempt was to parameterize the context, to allow both `VirtualizedList`, and `VirtualizedList_EXPERIMENTAL` to use the same code without sacrificing type safety or adding further duplication. This added more complexity than it is worth, so I am instead loosening the type on VirtualizedListContext to pass around a more generic handle.

Changelog:
[Internal][Changed] - Allow VirtualizedListContext to support different component type

Reviewed By: javache

Differential Revision: D38017086

fbshipit-source-id: 91e8f6ab2591d3ae9b7f9263711b4a39b78f68e0
2022-07-26 20:06:58 -07:00
..
2022-07-14 17:00:28 -07:00
2022-04-05 12:15:05 -07:00
2022-04-05 12:15:05 -07:00
2022-07-05 13:03:11 -07:00