An updated guide for setting up React Native Storybook 10 and toggling it cleanly without polluting the production bundle. Covers both Expo and Community CLI setups. Key improvements include built-in Expo environment variable support, the new withStorybook Metro helper, and Metro's resolver.resolveRequest option. The withStorybook enabled flag strips Storybook from the production bundle by mocking out the .rnstorybook folder with empty modules and a stub component, preventing crashes while keeping the bundle clean.

9m read timeFrom callstack.com
Post cover image
Table of contents
What's changed?Let's get into itThe Expo guideCommunity CLIHow does this work under the hood?In conclusion

Sort: