react-native/Libraries/Experimental
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
..
SwipeableRow Update SwipeableListView props and more 2017-02-23 15:17:02 -08:00
__flowtests__ Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
__tests__ Rename flow type Viewable -> ViewToken 2017-02-28 02:17:23 -08:00
FlatList.js Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
Incremental.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
IncrementalExample.js Clean unused import modules. 2016-10-16 11:13:40 -07:00
IncrementalGroup.js Reverted commit D4027388 2016-10-16 04:13:42 -07:00
IncrementalPresenter.js Auto-fix lint errors 2016-08-09 06:43:46 -07:00
MetroListView.js Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
SectionList.js Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
ViewabilityHelper.js Rename flow type Viewable -> ViewToken 2017-02-28 02:17:23 -08:00
VirtualizeUtils.js Better ListView - FlatList 2017-02-04 10:28:47 -08:00
VirtualizedList.js Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
VirtualizedSectionList.js Breaking API change - abandon `ItemComponent` in favor of `renderItem` 2017-02-28 02:17:23 -08:00
WindowedListView.js configurable Viewability 2017-02-21 17:14:59 -08:00