Closed WarriorofZarona closed 12 months ago
Hey @WarriorofZarona, the template got updated recently to add a fix for windows, can you try applying these changes to your project or redownload the template
That fixed worked! Thank you!
Closing thread since this was fixed
I followed https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/ in order to switch between storybook and the app when running certain CLI commands.
Firstly, I have an app.config.js file that looks like this:
Afterwards, I updated my App.tsx file with logic to switch between storybook and the app if the STORY_ENABLED flag is set to true:
Note that I had to add the optional chaining and just an eslint disable for typescript.
Thirdly, I added the following script to my package.json:
The big difference from the documentation is removing the && before STORYBOOK_ENABLED='true' because I'm on a windows machine, according to react native storybook problem with process.env.STORYBOOK_ENABLED
The idea is that I can use yarn start to start the app proper and use yarn storybook to set the flag to true and start storybook.
However, yarn storybook always opens the app instead. Am I missing something here?