You can use Storybook to test and share your component library quickly and easily! This example shows how to use Expo modules with Storybook CLI and Expo CLI.
This is setup as Storybook with Expo, instead of Expo with Storybook. This means that it's a dedicated RN app for Storybook, instead of attaching a Storybook instance to your current app (if you have one). If you have a pre-existing app setup with Expo, you could setup Storybook in the same project. This is setup to be separate, for something like a design system.
yarn
- Install dependenciesyarn web
- Run Storybook
yarn start
- Start Expo in browser (should open a new tab)- Wait for app to bundle. This may take 30+ seconds.
- Use QR code from Expo to open app on testing device (or press
i
to open simulator if available)
Storybook with Expo CLI
βββ stories
β βββ index.js β‘οΈ Native story imports
β βββ Example.stories.js β‘οΈ A Storybook page to render
βββ assets β‘οΈ All static assets for your project
βββ App.tsx β‘οΈ Entry Point for universal Expo apps
βββ app.config.js β‘οΈ Expo config file
βββ babel.config.js β‘οΈ Babel config (should be using `babel-preset-expo`)