mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add deprecation notice to SwipeableListView
Summary: ListView is deprecated and SwipeableListView uses ListView. Thus, it is deprecated as well. Reviewed By: RSNara Differential Revision: D10437408 fbshipit-source-id: a08391d5b099e74b6ec179cd940ac404b2e702f4
This commit is contained in:
committed by
Lorenzo Sciandra
parent
356fcf00dc
commit
581a6e8822
@@ -13,6 +13,7 @@
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
|
||||
let showedListViewDeprecation = false;
|
||||
let showedSwipeableListViewDeprecation = false;
|
||||
|
||||
// Export React, plus some native additions.
|
||||
const ReactNative = {
|
||||
@@ -122,6 +123,14 @@ const ReactNative = {
|
||||
return require('SwipeableFlatList');
|
||||
},
|
||||
get SwipeableListView() {
|
||||
if (!showedSwipeableListViewDeprecation) {
|
||||
console.warn(
|
||||
'ListView and SwipeableListView are deprecated and will be removed in a future release. ' +
|
||||
'See https://fb.me/nolistview for more information',
|
||||
);
|
||||
|
||||
showedSwipeableListViewDeprecation = true;
|
||||
}
|
||||
return require('SwipeableListView');
|
||||
},
|
||||
get TabBarIOS() {
|
||||
|
||||
Reference in New Issue
Block a user