requireNativeComponent is not a function with react-native-web
See original GitHub issueEnvironment
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 -y
npx -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)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to fix import error : 'requireNativeComponent' from 'react ...
Attempted import error: 'requireNativeComponent' is not exported from 'react-native-web/dist/index'. Please tell me why this is happening and ...
Read more >Storybook Issue: 'requireNativeComponent' is not a function #13
It's done in the webpack config file. You'd need to add 'react-native-linear-gradient': 'react-native-web-linear-gradient' .
Read more >Prerequisites for Libraries - React Native
The following steps will help ensure your modules and components are ready for the New Architecture.
Read more >react-native-safe-area-context - npm
A flexible way to handle safe area, also works on Android and web.. Latest version: 4.4.1, last published: 3 months ago.
Read more >React, how to fix the TypeError: resolver is not a function error
React, how to fix the TypeError: resolver is not a function error. Published in 2021. Psssst! The 2023 WEB DEVELOPMENT BOOTCAMP is starting...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m also running into this problem with a few tests, particularly
I’m thinking this might be more of a
react-native-web
problem thoughany news on this one? @penx did you resolve it somehow?