Skip to main content

Introduction

With Storybook for React Native you can design and develop individual React Native components without running your app.

React Native Storybook aims to be compatible with the core features of Storybook and aims for maximum code reuse from the web. The UI is reimplemented for Native whereas the core features come from the core Storybook internal API's.

Comparison

To understand how React Native Storybook works it is also useful to understand the differences between it and Storybook on the web.

FeatureReact Native StorybookWeb Storybook
Runtime EnvironmentNative mobile environment and basic web supportBrowser environment
PreviewRuns directly in your app, limited isolationRuns in iframe
AddonsCore addons supported (controls/actions/etc)Full addon ecosystem
Development ServerMetro bundler (potentially works with others)Webpack/Vite/etc
Platform FeaturesAccess to native API'sAccess to web API's
How it rendersReact Native component you integrate into your appIt's own separate app
DeployShip to test flight or other pre-prod app distributionDeploy on the web
Story syntaxCSFCSF

React Native Web

React Native can be used on the web via React Native Web and so you may be wondering can I use React Native Storybook on the web.

Yes you can use react native storybook on the web.

You can either run the native Storybook directly on the web or you can setup a web Storybook alongside your native storybook and use the @storybook/react-native-web-vite framework to get access to the full storybook feature set. You can trade off some extra config and setup for more features and the ability to easily deploy a hosted version of your storybook.

The docs here will focus on the Native storybook and only reference the vite framework where compatibility is concerned.