React Native Slider

Hi, community!

According to the Expo doc Slider is deprecated and we should use instead.
I installed @react-native-community/slider package and imported it:

import Slider from '@react-native-community/slider';

Then I run app and see following error:

Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

This error is located at:
    in RNCSlider (at Slider.js:247)
    in RCTView (at View.js:44)
    in TouchableHighlight (at PlayerScreen.js:401)

I google it and found this forum post that says, we need to link slider component:

react-native link @react-native-community/slider
  1. As far as I know we can’t link in Expo without detaching, am I right?
  2. If yes, why official doc pointing to non usable plugin?
  3. What is the way to use a slider with Expo?

Kind regards,

1 Like

Hello Anatolii,

@react-native-community/slider” is not compatible with Expo managed workflow, yet, moreover, you can’t link native code with managed expo app.

I don’t know if the Expo team plans to integrate it into the managed workflow in the next release.

What should you do?

  • Stay with the legacy Slider from “react-native”
  • Or move from “managed” workflow to “bare” one.


1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.