Deprecate RecyclerViewBackedScrollView

Summary:
cc brentvatne

potential reviewers mkonicek and kmagiera

**Motivation for making this change.**

The previous PR was closed : #11095 but the followup actions was never done

I reopened a really similar one so it get merged
RecyclerView is no more used at Facebook (according to previous PR)

According to brentvatne, their were two motivations for RecyclerView:
* ListView with ScrollView component used to bounce back on row insert, but this is now fixed
* This made possible to implement certain performance improvements, but the maintenance cost was not worth the risk

With RN 0.37, the actual code in React Native make the app crash:
- see #10560

I spend one hour investigating this and did also require brent time at exponent slack. I think other people are struggling too.

**Test plan**

<img width="708" alt="screen shot 2016-12-13 at 23 42 22" src="https://cloud.githubusercontent.com/assets/13785185/21162483/dbeb642e-c18d-11e6-9c32-1fe73f1826c1.png">

**Code formatting**

The
Closes https://github.com/facebook/react-native/pull/11445

Differential Revision: D4340640

Pulled By: mkonicek

fbshipit-source-id: 64c5cf060f2eb035d4d6199b30f0e73afc520180
This commit is contained in:
tychota 2016-12-16 12:21:44 -08:00 committed by Facebook Github Bot
parent 4308b9ea2c
commit 25cd2c5d7b

View File

@ -16,7 +16,13 @@ var requireNativeComponent = require('requireNativeComponent');
var INNERVIEW = 'InnerView'; var INNERVIEW = 'InnerView';
/** /**
* Wrapper around android native recycler view. * RecyclerViewBackedScrollView is DEPRECATED and will be removed from
* React Native.
* Please use a `ListView` which has `removeClippedSubviews` enabled by
* default so that rows that are out of sight are automatically
* detached from the view hierarchy.
*
* Wrapper around Android native recycler view.
* *
* It simply renders rows passed as children in a separate recycler view cells * It simply renders rows passed as children in a separate recycler view cells
* similarly to how `ScrollView` is doing it. Thanks to the fact that it uses * similarly to how `ScrollView` is doing it. Thanks to the fact that it uses
@ -58,6 +64,13 @@ var RecyclerViewBackedScrollView = React.createClass({
mixins: [ScrollResponder.Mixin], mixins: [ScrollResponder.Mixin],
componentWillMount: function() {
console.warn(
'RecyclerViewBackedScrollView is DEPRECATED and will be removed from React Native. ' +
'Please use a ListView which has removeClippedSubviews enabled by default so that ' +
'rows that are out of sight are automatically detached from the view hierarchy.')
},
getInitialState: function() { getInitialState: function() {
return this.scrollResponderMixinGetInitialState(); return this.scrollResponderMixinGetInitialState();
}, },