Skip to content

Commit

Permalink
Add deprecation warning while importing Slider component (#23385)
Browse files Browse the repository at this point in the history
Summary:
Introducing the deprecation warning for those who are importing `Slider` component (#23313)

[General] [Deprecated] - Deprecated Slider as it has now been moved to `react-native-community/slider`
Pull Request resolved: #23385

Differential Revision: D14029819

Pulled By: cpojer

fbshipit-source-id: 7ad257124756c6bee57c3fbb1a056c09e8cc29a1
  • Loading branch information
michalchudziak authored and facebook-github-bot committed Feb 11, 2019
1 parent ffe3748 commit bf888a7
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 @@ -104,6 +104,12 @@ module.exports = {
return require('SegmentedControlIOS');
},
get Slider() {
warnOnce(
'slider-moved',
'Slider 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/slider' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-slider',
);
return require('Slider');
},
get SnapshotViewIOS() {
Expand Down

0 comments on commit bf888a7

Please sign in to comment.