diff --git a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js index cc7246daf..b86a82f90 100644 --- a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js +++ b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js @@ -16,7 +16,13 @@ var requireNativeComponent = require('requireNativeComponent'); 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 * 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], + 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() { return this.scrollResponderMixinGetInitialState(); },