Skip to content

Commit

Permalink
Add deprecation warning for ViewPagerAndroid (#23395)
Browse files Browse the repository at this point in the history
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: #23395

Differential Revision: D14043025

Pulled By: cpojer

fbshipit-source-id: 2f7988fe69dbeff0f3add9babcb15d7eb974863e
  • Loading branch information
ferrannp authored and facebook-github-bot committed Feb 12, 2019
1 parent 3c74b6e commit 77300ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/react-native/react-native-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 77300ca

Please sign in to comment.