5

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?

Kuf
  • 17,318
  • 6
  • 67
  • 91
Peter
  • 1,280
  • 8
  • 15

2 Answers2

2

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

Muhammad Numan
  • 23,222
  • 6
  • 63
  • 80
0

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

Vijay122
  • 884
  • 8
  • 12