Skip to content

Commit 99471f8

Browse files
elicwhitefacebook-github-bot
authored andcommitted
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
1 parent 5e997f9 commit 99471f8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Libraries/react-native/react-native-implementation.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
const invariant = require('fbjs/lib/invariant');
1414

1515
let showedListViewDeprecation = false;
16+
let showedSwipeableListViewDeprecation = false;
1617

1718
// Export React, plus some native additions.
1819
module.exports = {
@@ -119,6 +120,14 @@ module.exports = {
119120
return require('SwipeableFlatList');
120121
},
121122
get SwipeableListView() {
123+
if (!showedSwipeableListViewDeprecation) {
124+
console.warn(
125+
'ListView and SwipeableListView are deprecated and will be removed in a future release. ' +
126+
'See https://fb.me/nolistview for more information',
127+
);
128+
129+
showedSwipeableListViewDeprecation = true;
130+
}
122131
return require('SwipeableListView');
123132
},
124133
get TabBarIOS() {

0 commit comments

Comments
 (0)