From 77300ca91c17d371f6ba04230b8c2e8f5cd99ab8 Mon Sep 17 00:00:00 2001 From: ferrannp Date: Tue, 12 Feb 2019 05:20:32 -0800 Subject: [PATCH] Add deprecation warning for ViewPagerAndroid (#23395) Summary: Add a deprecation warning for the [ViewPagerAndroid](https://facebook.github.io/react-native/docs/viewpagerandroid) module as part of #23313. [General] [Deprecated] - Deprecated [ViewPagerAndroid](https://facebook.github.io/react-native/docs/viewpagerandroid) as it has now been moved to [react-native-community/viewpager](https://github.com/react-native-community/react-native-viewpager) Pull Request resolved: https://github.com/facebook/react-native/pull/23395 Differential Revision: D14043025 Pulled By: cpojer fbshipit-source-id: 2f7988fe69dbeff0f3add9babcb15d7eb974863e --- Libraries/react-native/react-native-implementation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 18acbc22165d08..84b4992db493f0 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -163,6 +163,12 @@ module.exports = { return require('View'); }, get ViewPagerAndroid() { + warnOnce( + 'viewpager-moved', + 'ViewPagerAndroid has been extracted from react-native core and will be removed in a future release. ' + + "It can now be installed and imported from '@react-native-community/viewpager' instead of 'react-native'. " + + 'See https://github.com/react-native-community/react-native-viewpager', + ); return require('ViewPagerAndroid'); }, get VirtualizedList() {