instea / react-native-color-picker

Color picker component for IOS/Android
Apache License 2.0
272 stars 67 forks source link

Fix deprecation warning for Slider component #40

Closed huming2207 closed 6 months ago

huming2207 commented 3 years ago

Hi there,

Firstly thanks for your great library.

I've just tried out the v0.6.0 from npm with React Native v0.63.4 and it gave me this deprecation warning:

 ERROR    Warning: 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 
HoloColorPicker@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:149965:30
LedScreen
StaticContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:106010:17
EnsureSingleNavigator@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:104644:24
SceneView@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:105900:22
RCTView
RCTView
RCTView
CardSheet@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115977:23
RCTView
AnimatedComponent@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:61246:24
AnimatedComponentWrapper
PanGestureHandler@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:100111:38
PanGestureHandler@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:111044:34
RCTView

... ... ...

This is due to the Slider component from React Native is going to move out from react-native to a standalone library. This PR provides the fix.

Regards, Jackson

sodik82 commented 3 years ago

I am still thinking if using @react-native-community/slider as peer dependency is good idea - it would break support for Web and probably for also for UWP...

what do you (and others) think?

huming2207 commented 3 years ago

Hi @sodik82

The @react-native-community/slider does support Windows and web, but the web support I think it's not stabilized yet...