Open thani-sh opened 8 years ago
Is the repo can be access from outside ?
Just pushed changes to react-native-button repo. Check the test-specs branch there.
To reproduce the error from a clean app:
npm -g i getstorybook
react-native init MyTestApp
cd MyTestApp
npm install -D storybook-addon-specifications
echo "import 'storybook-addon-specifications/register';" >> storybook/addons.js
npm run storybook
react-native run-ios
It works fine if I install the missing babel plugin.
npm install -D babel-plugin-add-module-exports
This is entirely a storybook side issue. I'll comment here when it's ready.
Here's what I found so far:
React Native uses babel config from dependencies to transform them. This error comes when RN tries to use babel config from inline-style-prefixer
module (loaded by aphrodite). Unfortunately we can't fix it from react-native-storybook.
The easiest fix is to avoid using aphrodite for now.
Let's assume we fix the above error. The next problem is getting enzyme to run inside react-native. It's also giving an error. To reproduce this error, try running this repo with npm start
and react-native run-ios
.
Hey what is the status of the plug-in with react-native ?
Well, if someone wants to give this a try, I'm all in to add this feature :)
I would love for this addon work with react native.
Am i right to think that this addon is only for react web? because normally react native addon package will have the prefix ''@storybook/addon-ondevice-****". Like knobs addon for web is @storybook/addon-knobs and for react-native is : @storybook/addon-ondevice-knobs
Hi, React Native Storybook supports addons form
v2
. The specifications addon doesn't seem to work out of the box with it. Got the error below when using with a simple repo. I'll try to find why we're getting this error and send a pull-request if I can.If there are any Webpack Gurus around here, please check this out.