I used previous version of Storybook with RN, now all reference from docs is removed?
Does that mean Storybook does not support RN anymore?
Thank you,
Misha
Not yet. We've created a new repo for RN and are in the process of upgrading it to work with SB6: https://github.com/storybookjs/react-native
@dannyhw might be able to comment more on the current status!
Phew its good to know you didn't drop the support 馃榾
Would be awesome to know the status. We are starting new RN project and I guess we need to use old Storybook for now.
Thx man
@mi5ha you can still use the react native storybook in it's current state however it doesn't support the 6.0 dependencies so if you use the addons then for the react native project you would need to use a 5.3.x version of @storybook/addons. See github.com/storybookjs/react-native to see the new repo and some documentation (improvements ongoing).
I plan to start the work for react native 6.0 soon-ish but not sure how long that will take.
@dannyhw Thank you Danny, I managed to install and run old Storybook version 5 with:
npx -p @storybook/cli@^5 sb init --type react_native -y
npm remove @storybook/addons @storybook/addon-actions @storybook/addon-links
npm install --save-dev @storybook/addons@^5 @storybook/addon-actions@^5 @storybook/addon-links@^5
I used newest RN version with TypeScript support.
I tried running npx -p @storybook/cli sb init --type react_native -y but it breaks for now.
Thanx a lot, will be following the progress of version 6 for RN with great interest 馃榾
I just followed the storybook.js.org guide for React and it created a .storybook/ folder on my project's root folder; should I delete it?
From what I've tested, those files created inside that folder does nothing, and it's pretty confusing having two storybook folders in my project(one with a dot .storybook/ and one without storybook/)
@betoharres the react native storybook uses a folder without the "." just because of some historical reason and I'm not really sure what that reason is (the project was not created by me). You need a storybook/ folder for react native storybook only if you want to define web addons for the react-native-server otherwise it's not a requirement. For example where I work we use exclusively the ondeviceUI (no react-native-server) and we have no storybook/ folder.
Another note related to the comment by @mi5ha above you can use npx -p @storybook/cli@next sb init --type react_native -y now because I put out a fix for the cli which is currently in the alpha version. I think it will be coming out with the 6.1 release since the cli is part of the storybook repo.
@dannyhw what's the PR for the CLI? i could patch it back to 6.0 if the change is not too big.
@shilman its this one #12405
Most helpful comment
@betoharres the react native storybook uses a folder without the "." just because of some historical reason and I'm not really sure what that reason is (the project was not created by me). You need a storybook/ folder for react native storybook only if you want to define web addons for the react-native-server otherwise it's not a requirement. For example where I work we use exclusively the ondeviceUI (no react-native-server) and we have no storybook/ folder.
Another note related to the comment by @mi5ha above you can use
npx -p @storybook/cli@next sb init --type react_native -ynow because I put out a fix for the cli which is currently in the alpha version. I think it will be coming out with the 6.1 release since the cli is part of the storybook repo.