Deprecate PullToRefreshViewAndroid and remove it from the website

Summary:I forgot to add a deprecation warning to PullToRefreshViewAndroid when I worked on RefreshControl. This adds one as well as remove it from the website and remove the UIExplorer example. Now that we have versioned doc I think it is fine to remove deprecated stuff from the website so it is easier for users to know what component they should use. Last thing, I enabled flow in RefreshControl and fixed the one warning.
Closes https://github.com/facebook/react-native/pull/6055

Differential Revision: D2959502

Pulled By: mkonicek

fb-gh-sync-id: 9b23f84ea35c770bfe2a83d0fd3ec7e439669c33
shipit-source-id: 9b23f84ea35c770bfe2a83d0fd3ec7e439669c33
This commit is contained in:
Janic Duplessis
2016-02-21 16:16:42 -08:00
committed by facebook-github-bot-2
parent 89ea985540
commit 91788d2bbd
5 changed files with 11 additions and 134 deletions

View File

@@ -21,9 +21,11 @@ var requireNativeComponent = require('requireNativeComponent');
var NATIVE_REF = 'native_swiperefreshlayout';
/**
* Deprecated. Use `RefreshControl` instead.
*
* React view that supports a single scrollable child view (e.g. `ScrollView`). When this child
* view is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
*
*
* The style `{flex: 1}` might be required to ensure the expected behavior of the child component
* (e.g. when the child is expected to scroll with `ScrollView` or `ListView`).
*/
@@ -56,6 +58,10 @@ var PullToRefreshViewAndroid = React.createClass({
size: React.PropTypes.oneOf(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE),
},
componentDidMount: function() {
console.warn('`PullToRefreshViewAndroid` is deprecated. Use `RefreshControl` instead.');
},
getInnerViewNode: function() {
return this.refs[NATIVE_REF];
},