Malde uses a story about developer Ella to show how Storybook helps teams build, test, and document UI components outside the full app. Stories capture a component’s rendered state, and controls and actions let developers vary props and check callbacks. The React Native Web add-on makes React Native components available in Storybook for the web, where teams can use web features such as interaction tests.
A Story(book) About Testing
Speaker
Anisha Malde, a React Native developer advocate at Amazon, explains how React Native teams can use Storybook and Chromatic for component development, testing, and review at React Native EU 2023.
Storybook’s Jest-powered test runner can check that stories render without errors and validate assertions in their play functions. Malde says tests can run locally, in CI, or against a deployed Storybook, with coverage tracking. Interaction tests use a play function to simulate actions, such as pressing a login button and checking that the displayed state changes.
Chromatic pairs with Storybook to automate visual and interaction testing. Its pixel-based snapshots help teams compare component appearance across builds, branches, and commits; Malde distinguishes these from Jest snapshots, which compare rendered output. Chromatic also makes components searchable and documented, supports UI review with teammates, and can connect Storybook implementations to Figma variants.
Storybook can reduce the cost of testing individual components, make edge cases easier to check, and let frontend teams work independently of backend functionality. It can also help design system maintainers share components and help teams prototype flows. Malde notes setup overhead, differences between web and device rendering, limited parity between native and web features, and the challenge of making Storybook the app entry point.
For device-specific checks, Malde suggests running Maestro tests against Storybook on a device. She also describes using Turborepo to keep Storybook in a separate app, preserving the main app’s entry point, and a setup that runs the emulator and web version together. These approaches let teams use web-based Storybook features while retaining options for native testing.
Takeaways
- Write stories for edge cases so components can be tested without launching the full app.
- Use Storybook’s test runner to check rendering and interaction assertions in CI.
- Use Chromatic snapshots to review visual changes across builds and commits.
- Run device automation such as Maestro when web rendering may differ from native behavior.
- Consider a separate Storybook app in a monorepo to avoid replacing the main app’s entry point.
Mentioned in this talk
Search inside this talk
What was claimed 12
- role atAnisha Malde is developer advocate at Amazon
“my role model for developer advocacy”
0:05inWhat is Developer Advocacy? Inside the RoleYouTube Verified6 sources· Talk
- feature
Storybook: Open-source front-end workshop for building, testing, and documenting components in isolation
“an open-source front-end workshop for building, testing, and documenting components in isolation”
YouTube Unverified1 source· Talk
- integrates withStorybook for React Native integrates with Expo
“Expo has made it really easy: You can use the project boilerplate with Storybook for React Native already configured”
YouTube Unverified1 source· Talk
- featureStorybook for React Native: Supports a React Native Web add-on that displays React Native components in Storybook for Web
“This add-on helps you configure Storybook for React, or the Storybook web version, to display React Native components”
YouTube Unverified1 source· Talk
- uses
“Storybook's test runner turns all the stories she'd already written into executable tests, and it's powered by Jest”
YouTube Unverified1 source· Talk
- featureStorybook for Web: Supports interaction tests using a play function that runs after a story renders
“with Web, you can run these interaction tests”
YouTube Unverified1 source· Talk
- featureChromatic: Automates visual and interaction tests
“automating visual and interaction tests”
YouTube Unverified1 source· Talk
- integrates with
“Chromatic is a complimentary tool that pairs really well with Storybook”
YouTube Unverified1 source· Talk
- featureChromatic: Captures cross-browser, pixel-perfect snapshots of rendered code
“Chromatic takes cross-browser, pixel-perfect snapshots of your rendered code”
YouTube Unverified1 source· Talk
- featureChromatic: Supports UI implementation review with team conversations, reviewers, and sign-off
“you can quickly share the work with your team”
YouTube Unverified1 source· Talk
- integrates with
“Chromatic connects Storybook to Figma variants”
YouTube Unverified1 source· Talk
- integrates withStorybook for React Native integrates with
Maestro“You can run your version of Storybook, write your Maestro tests, and then run them on the device”
YouTube Unverified1 source· Talk





