Search code examples
react-nativestorybook

How to switch back to origin app after using storybook react native


I had a react native app. I applied storybook by using getstorybook from official doc.

Every times I run react-native run-ios, the app is the storybook, not my app anymore. Now I don't know how to switch back my original app.

I tried to close all my terminals + remove build folder but no one worked.


Solution

  • I found solution:

    • storybook for react native use React Packager of react native to bundle the stories.
    • because the Packager was used for storybook, it could not be used for app.
    • to fix this, just close all process related to storybook first
    • then run npm run start or yarn start to make Packager used for the app.
    • then run react-native run-ios/android will get the app back.