React-native-slider: Slider does nor work for expo apps, managed workflow

Created on 31 Jan 2020  路  8Comments  路  Source: callstack/react-native-slider

Environment

"expo": "^36.0.0",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"@react-native-community/slider": "^2.0.8"

Description

Slider does not work on expo app, on managed workflow,

I tried two solutions:
1st:
1- npm install @react-native-community/slider 鈥搒ave
2- import Slider from '@react-native-community/slider';
With that I am getting: "Invariant Violation: Invariant Violation: Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager."

2nd:
1- npm install @react-native-community/slider 鈥搒ave
2- react-native link @react-native-community/slider
3- import { Slider } from 'react-native' ( instead of import Slider from '@react-native-community/slider';)
With this solution, component Slider comes from 'react-native' not the one from community, like link didn't do anything.
I wanted to use props: onSlidingStart, which is included in react-native-slider but not in deprecated slider from react-native.

Most helpful comment

The community slider component is not yet available for managed workflow for expo.
Please continue to use import {Slider} from 'react-native', as it still exists in the core.
Once the slider component has been removed from the core, expo will support the community packages.
https://docs.expo.io/versions/latest/react-native/slider/

All 8 comments

I have the exact same environment from above and am seeing the same issue:

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

same here, imported as stated in the readme and getting the same error
requireNativeComponent: "RNCSlider" was not found in the UIManager

the same requireNativeComponent: "RNCSlider" was not found in the UIManager

Same:
requireNativeComponent: "RNCSlider" was not found in the UIManager.

Device: (0:0) (0 , n(...).requireNativeComponent) is not a function

Same. So is there a solution?
requireNativeComponent: "RNCSlider" was not found in the UIManager.

The community slider component is not yet available for managed workflow for expo.
Please continue to use import {Slider} from 'react-native', as it still exists in the core.
Once the slider component has been removed from the core, expo will support the community packages.
https://docs.expo.io/versions/latest/react-native/slider/

I'm _not_ using Expo and I'm not yet developing for a Windows app, but I have the same error: Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

PS > react-native --version
react-native-cli: 2.0.1
react-native: 0.61.4

PS > react-native info
info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.19041
    CPU: (8) x64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
    Memory: 3.44 GB / 15.89 GB
  Binaries:
    Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.19.1 - C:\Users\jhale\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    Android Studio: Version  4.0.0.0 AI-193.6911.18.40.6514223
  npmPackages:
    react: ^16.11.0 => 16.12.0
    react-native: 0.61.4 => 0.61.4

From package.json: "@react-native-community/slider": "^3.0.3",

From yarn.lock:

"@react-native-community/slider@^3.0.3":
  version "3.0.3"
  resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-3.0.3.tgz#830167fd757ba70ac638747ba3169b2dbae60330"
  integrity sha512-8IeHfDwJ9/CTUwFs6x90VlobV3BfuPgNLjTgC6dRZovfCWigaZwVNIFFJnHBakK3pW2xErAPwhdvNR4JeNoYbw==

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bahmanian picture bahmanian  路  7Comments

ralph-dev picture ralph-dev  路  10Comments

canyavall picture canyavall  路  5Comments

lolcookie picture lolcookie  路  7Comments

akrger picture akrger  路  6Comments