React-native storybook without dev. server

767 views Asked by At

I am using the react-native storybook. (https://github.com/storybookjs/react-native#storybook-for-react-native).
With some dev. server there is a nice overview for the storybook. My question is:

Is it possible to render the react-native storybook in the app without any dev. server.?
If yes, how?

2

There are 2 answers

0
Vijay122 On

If you think you want to list and display the components created in a web view, so that it is shareable without running the app in dev mode, you should look for storybook server option.

https://github.com/storybookjs/react-native/blob/master/app/react-native/readme.md

0
Muhammad Numan On

yes, you can render the react-native storybook in the app without any webpack dev server

you need to install @storybook/react-native package and follow the Docs

here is an example project: https://github.com/nomi9995/expo-storybook-boilerplate.git

  1. clone above boilerplate
  2. install node_modules by yarn or npm install
  3. run storybook app by yarn start or expo start
  4. then press i to open app on ios simulator

enter image description here