I'm trying to create a slider in my react native Android App, and relatively new to React Native. The React Native documentation says their Slider component is deprecated (https://reactnative.dev/docs/slider.html) and directs us to use @react-native-community/slider instead (https://github.com/react-native-community/react-native-slider/blob/master/README.md).
I installed the library in my project directory using npm install @react-native-community/slider --save
.
The install succeeded and my versions in my package.json are as follows:
"dependencies": {
"@react-native-community/slider": "^3.0.3",
"react": "16.13.1",
"react-native": "0.63.0" },
I am including the Slider in my source file with import Slider from '@react-native-community/slider';
, however when ever I try to actually create a slider in my code with the <Slider> ... </Slider>
tags, I get the following compile error:
ERROR Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.
I've been banging my head against the wall and can't figure out how to clear the error. I am on Windows 10 x64 developing for Android. Thanks in advance!