react-native
react-native copied to clipboard
[6.0] Add 6.0 project setup to the cli
Add support to initialize a React Native Storybook v6 project with the Storybook CLI.
Initial implementation plan
The relevant Storybook CLI code is here:
- Triggering of the generator: https://github.com/storybookjs/storybook/blob/next/lib/cli/src/initiate.ts#L120
- Generator: https://github.com/storybookjs/storybook/blob/next/lib/cli/src/generators/REACT_NATIVE/index.ts
Make a pull request to change those so that V6 Storybook React Native setup is performed instead of the V5 Storybook React Native setup.
Things to think about
The CLI init currently happens via
npx -p @storybook/cli sb init --type react_native
The React Native Storybook V6 packages are currently in @next at NPM. If we modify what --type react_native does, then we need to do two things:
- Accept that the V5 setup stops working when the CLI PR is merged & published (the CLI now sets up V6 Alpha instead)
- Make a follow-up PR that changes the dependencies to be installed from the default NPM instead of
@nextonce the actual Storybook React Native V6 release is out
I think that commits are cherrypicked into releases rather than including everything from next. I need to check that though.
Actually spoke with them about this and commits are only cherry picked for patches so we would have to do something like a temporary project type
@dannyhw, @lauriharpf and other contributors, I just wanted to say TY for all your work putting in the work to get this next release for story book. I am big user of storybook for React Native and I can't wait to start using the new features.
Unfortunately I'm currently too busy with other projects for the time being to continue working with this, so unassigned myself.
No problem @lauriharpf, thanks for the update. Hope all is well.
Closing since this was completed