-
I'm using storybook with react native. I used react-native-web to display my components in the storybook on the browser and it worked. But whenever I integrate native base, by only importing its components, I get the following error: in ./node_modules/react-native/Libraries/Image/AssetSourceResolver.js Module not found: Error: Can't resolve '../Utilities/Platform' in 'D:\projects\testingStorybook\SomethingElse\node_modules\react-native\Libraries\Image' Note that I was able to load static images in the storybook and native base components loaded successfully on my android emulator. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Here's an example of native base with react native web storybook. Looks like you just need to allow for the .web file extension, when you use addon-react-native-web this is resolved for you. if you can share the repo or provide a public repository that reproduces the problem I can have a look. |
Beta Was this translation helpful? Give feedback.
Here's an example of native base with react native web storybook.
https://github.com/dannyhw/NativeBaseStorybookExample
Looks like you just need to allow for the .web file extension, when you use addon-react-native-web this is resolved for you.
if you can share the repo or provide a public repository that reproduces the problem I can have a look.