Files
react-native/types
Nick Gerleman febf6b7f33 Constrain data type in getItemLayout callback (#36237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36237

This changes the data parameter type for `getItemLayout` from a mutable array (too lenient, even before), to `ArrayLike`, which is now the most constrained subset of data which may be passed to a FlatList.

We could do something more exact by adding another generic parameter to FlatList, but that would be likely be noticeably more breaking, since during testing I couldn't manage a pattern that both kept the same minimum number of generic arguments while keeping inference working.

Changelog:
[General][Breaking] - Constrain data type in `getItemLayout` callback

Reviewed By: javache

Differential Revision: D43466967

fbshipit-source-id: 7a1ce717e7d5cc96a58b8d3ad9def6cf6250871f
2023-02-24 16:19:14 -08:00
..
2022-11-02 14:58:37 -07:00
2023-01-16 02:42:18 -08:00
2022-09-20 12:39:58 -07:00
2022-11-02 14:58:37 -07:00