Spencer Ahrens
5c856150ff
Kill shouldItemUpdate
...
Summary:
It was just adding unnecessary complexity. Users should just use standard React perf best practices, like `PureComponent` and `shouldComponentUpdate`.
This should be backwards compatible - existing `shouldItemUpdate` usage will just be ignored and should consider migrating to this pattern:
```
class MyItem extends React.PureComponent {
_onPress = () => {
this.props.onPressItem(this.props.id);
};
render() {
return (
<SomeOtherWidget title={this.props.title} onPress={this._onPress} />
)
}
}
...
_renderItem = ({item}) => (
<MyItem onPressItem={this._onPressItem} title={item.title} id={item.id} />
);
```
Which will automatically prevent re-renders unless the relavent data changes.
Reviewed By: yungsters
Differential Revision: D4730599
fbshipit-source-id: 0f61efe96eb4d95bb3b7c4ec889e3e0e34436e56
2017-03-21 22:30:30 -07:00
..
2017-02-17 14:48:17 -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
2017-03-04 19:30:34 -08: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-03-21 22:30:30 -07: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-03-02 07:47:21 -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-03-21 22:30:30 -07:00
2017-02-27 14:04:56 -08:00
2017-02-27 14:04:56 -08:00
2017-03-09 20:16:37 -08:00
2016-10-16 06:43:46 -07:00
2017-02-27 14:04:56 -08:00
2017-03-21 22:30:30 -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-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-03-21 22:30:30 -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
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-03-20 00:02:58 -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
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-28 15:45:43 -08:00
2017-03-09 20:16:37 -08:00
2017-03-06 21:51:40 -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-03-02 15:15:31 -08:00
2017-03-02 13:17:35 -08:00
2017-03-08 05:01:36 -08:00
2017-02-28 15:45:43 -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
2016-07-26 01:13:31 -07:00
2017-02-28 15:45:43 -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