From 99471f87b944b26bbdaa0fb0881db91c1118b741 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 18 Oct 2018 15:31:11 -0700 Subject: [PATCH] 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 --- Libraries/react-native/react-native-implementation.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 9138218a2eb4c8..0b76506bb7e941 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -13,6 +13,7 @@ const invariant = require('fbjs/lib/invariant'); let showedListViewDeprecation = false; +let showedSwipeableListViewDeprecation = false; // Export React, plus some native additions. module.exports = { @@ -119,6 +120,14 @@ module.exports = { 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() {