mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 06:38:13 +00:00
Add deprecation warning while importing Slider component (#23385)
Summary: Introducing the deprecation warning for those who are importing `Slider` component (https://github.com/facebook/react-native/issues/23313) [General] [Deprecated] - Deprecated Slider as it has now been moved to `react-native-community/slider` Pull Request resolved: https://github.com/facebook/react-native/pull/23385 Differential Revision: D14029819 Pulled By: cpojer fbshipit-source-id: 7ad257124756c6bee57c3fbb1a056c09e8cc29a1
This commit is contained in:
parent
ffe37487b2
commit
bf888a7582
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user