Spencer Ahrens
2a1ab36257
Breaking API change - abandon ItemComponent
in favor of renderItem
...
Summary:
After a fair bit of use, we have concluded that the `ItemComponent` mechanism is not worth the
hassle. Flow has trouble type checking it thoroughly, requiring an 'item' prop is annoying, and it
is very common to need to capture `this` anyway, e.g. for an `onPress` handler. A common pattern was
something like:
_renderItem = ({item}) => <MyItem foo={item.foo} onPress={() => this._onPress(item)} />};
...
ItemComponent={this._renderItem}
which wouldn't flow check the props and doesn't benefit from reusing components.
If we find some specific patterns that would benefit from the `ItemComponent` pattern, we can create
a new component that provides that API and wraps `FlatList` under the hood.
I'm going to do `SectionList` in a stacked diff.
Reviewed By: bvaughn
Differential Revision: D4625338
fbshipit-source-id: a4901f1c9d77e0115b0b8032b8c210f624e97ea3
2017-02-28 02:17:23 -08:00
..
2017-02-17 14:48:17 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2017-02-27 18:34:19 -08:00
2017-02-27 18:34:19 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-10-16 04:13:42 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-18 23:28:25 -07:00
2017-02-27 14:04:56 -08:00
2016-10-16 11:13:40 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-24 12:45:56 -08:00
2017-02-28 02:17:23 -08:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2016-11-22 21:13:52 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-26 01:13:31 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-28 02:17:23 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-02 08:58:33 -08:00
2017-02-27 14:04:56 -08:00
2016-10-16 06:43:46 -07:00
2017-02-27 14:04:56 -08:00
2017-02-28 02:17:23 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-09-06 03:59:01 -07:00
2017-02-27 14:04:56 -08:00
2016-11-24 22:43:28 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-28 02:17:23 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2016-07-12 05:59:13 -07:00
2017-02-27 14:04:56 -08:00
2017-01-29 04:13:27 -08:00
2017-02-09 14:16:17 -08:00
2016-07-26 01:13:31 -07:00
2017-02-27 14:04:56 -08:00
2016-10-16 11:13:40 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-12-07 21:43:35 -08:00
2016-09-06 19:58:35 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2016-07-26 01:13:31 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00