Home > Software engineering >  How to integrate storybook into react-native package 'create-react-native-library'
How to integrate storybook into react-native package 'create-react-native-library'

Time:01-31

Hi i want to run storybook in a react-native package, that i have created with create-react-native-library.

So, the steps i ve done, in order to havethe package up and running are:

  1. from the react-native documentation : enter image description here

    So, is there a way to integrate the storybook into this package ? Do i miss anything ? thanks

    CodePudding user response:

    According to the Storybook for React Native | Documentation,

    You have to specify the --type as react_native not react.

    npx -p @storybook/cli sb init --type react_native
    

    CodePudding user response:

    To use storybook with react native you have to change --type to react_native.

    This means, that your command to initialize storybook will be:

    npx -p @storybook/cli sb init --type react_native
    
  • Related