Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 facebook@b2f871a). 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
- Loading branch information