react-native-slider
react-native-slider copied to clipboard
requireNativeComponent is not a function with react-native-web
Environment
react-native-web, storybook
Description
"requireNativeComponent is not a function" when using 3.0.0-rc.2 and react-native-web
Reproducible Demo
https://github.com/penx/react-mixer/tree/6126b45efefb9bd4b4e600d9a4e6191616d7a8c3
Steps to recreate:
npm init -ynpx -p @storybook/cli sb init --type react- add react-native-web to dependencies and in storybook webpack alias
- add
import Slider from '@react-native-community/slider';to a story
TypeError: (0 , _reactNative.requireNativeComponent) is not a function
at Object../node_modules/@react-native-community/slider/dist/RNCSliderNativeComponent.js (http://localhost:6006/vendors~main.164a2871296ea09f7f00.bundle.js:115:255)
I'm also running into this problem with a few tests, particularly
react-native-safe-area-context
react-native-calendars
react-native-gesture-handler
I'm thinking this might be more of a react-native-web problem though
+1
any news on this one? @penx did you resolve it somehow?
@BartoszKlonowski I believe this specific issue can be closed. I've confirmed this is no longer happening in v4.3.3. To be clear, web isn't functional in the most recent version, you just don't get this specific error.
For those of you that are interested, I'm working on web support here https://github.com/callstack/react-native-slider/pull/462 and as of this point that PR is minimally functional for my use-cases.
Yes, this one can be closed by #462 Thank you, @jspizziri!