DEV Community

Discussion on: Step 1: Setting up React Native with Storybook

Collapse
 
ugglr profile image
Carl-W • Edited

It depends, if you are using this approach and having it in the same repo as the app you are planning to ship, then I would suggest doing something like this in your entry file:

const useStorybook = {set this in some config file} <Boolean>

const App = () => useStorybook ? <Storybook /> : <Application />

AppRegistry.registerComponent(appName, () => App);

Enter fullscreen mode Exit fullscreen mode

Originally my thinking was to ship the ui-library as an NPM package and then installed in the app so the UI and the App could be developed in parallell.