From bf888a7582763a593d8b36874d242653fc0a9575 Mon Sep 17 00:00:00 2001 From: michalchudziak Date: Mon, 11 Feb 2019 13:31:34 -0800 Subject: [PATCH] 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 --- 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 f4fc0b88c1cae1..9649593d4d3b1a 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -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() {