Skip to content

Commit

Permalink
[Android] Deprecate RecyclerViewBackedScrollView
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Konicek committed Nov 23, 2016
1 parent ea913e4 commit e9ca906
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -58,6 +64,14 @@ var RecyclerViewBackedScrollView = React.createClass({

mixins: [ScrollResponder.Mixin],

componentWillMount: function() {
log.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();
},
Expand Down

0 comments on commit e9ca906

Please sign in to comment.