This is the first post in a series of setting up a react native UI library development foundation. Please refer to the link collections here Serie...
For further actions, you may consider blocking this person and/or reporting abuse
This article is really good! I was struggling a lot reading in other places but this one got me right where it should be in the code.
Hi 👋 thank you! 🤓 Glad I could help ☕️
No one of the options works for me, the first option loads the emulator but the menu-bar keeps loading and the 2nd neither works :'(
I need to add something to storyloader.js?
same, using expo
In this tutorial, we redirect our root level index.js to storybook's index.js. But by doing this, we can no longer run the app when we're developing. We can only run storybook.
Is there some way we can fork inside index.js to either run the app, or run storybook in the emulator? Or for that matter, run the emulator by bypassing index.js and looking directly at storybook/index.js?
I would suggest doing something like this in your entry file:
Should we have the storybook as a separate repo or inside the same project? Because all stories.js will also bundle in the React Native App right?
Same question here, were you able to find any way to resolve this?
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:
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.
same question here?
Hi, Good explanation. I want to preview the storybook on web without emulator. If this is possible please help me to achieve this?
Yes! If you go through the other steps in this series you will have that up and running :)
Nice article. Thank you! 🙌
P.S. If you are using Typescript, make sure you have the
tsx
extension for your components and stories. ⚠️the command should be *yarn add -D react-native-storybook-loader *
or
yarn add --dev react-native-storybook-loader
Despite putting the config block in package.json, I still had to manually run the prestorybook target in scripts first before running ios so that the storybook/storyLoader.js file was created.