Skip to content

Commit 1cdf151

Browse files
committed
copy edits
1 parent 324b018 commit 1cdf151

6 files changed

Lines changed: 9 additions & 6 deletions

File tree

β€Ždocs/docs/intro/configuration/cli-configuration.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Auto-generated file containing:
147147

148148
**Important**: Never edit this file manually - it's regenerated automatically.
149149

150-
## When the CLI is needed
150+
## CLI usage requirements
151151

152152
### With a `withStorybook` wrapper (you don't need the CLI)
153153

β€Ždocs/docs/intro/configuration/index.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default StorybookUIRoot;
182182
- `getItem`: Function to retrieve stored values
183183
- `setItem`: Function to store values
184184

185-
- **Websocket Options** (auto-injected when using the bundler-agnostic `withStorybook` β€” only needed for manual setups)
185+
- **Websocket Options** (only needed for manual setups. These are auto-injected when using the bundler-agnostic `withStorybook` wrapper)
186186
- `enableWebsockets`: Enable remote control (default: false)
187187
- `host`: Websocket host (default: 'localhost')
188188
- `port`: Websocket port (default: 7007)

β€Ždocs/docs/intro/getting-started/expo-router.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Since this approach renders Storybook inside your app (not as a separate entry p
2525
```js
2626
// metro.config.js
2727
const { getDefaultConfig } = require('expo/metro-config');
28+
// Use the Metro-specific wrapper for route-based setup
2829
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
2930

3031
/** @type {import('expo/metro-config').MetroConfig} */

β€Ždocs/docs/intro/getting-started/index.mdβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ keywords: [react native, storybook, getting started, installation, setup, expo,
77
# Getting started
88

99
There are a few different ways to get started, the main recommendation is to use the CLI init.
10-
This guide is intended for v10 of storybook. For v9 docs see the [v9.1 docs](https://github.com/storybookjs/react-native/tree/v9.1.4).
10+
This guide is intended for Storybook version 10+. For v9 docs see the [v9.1 docs](https://github.com/storybookjs/react-native/tree/v9.1.4).
1111

1212
React Native Storybook works with both plain React Native and Expo but examples are using Expo for brevity since Expo is officially recommended by Meta. For plain React Native projects there should be minimal differences.
1313

1414
:::info Expo Router Users
15-
If you're using **Expo Router** for file-based navigation, follow our dedicated [Expo Router Setup guide](./expo-router.md) instead of the standard setup below. Expo Router benefits from a specific configuration for routing integration.
15+
For most projects, the simplest approach is entry-point swapping: the bundler swaps your app’s entire entry point for Storybook when `STORYBOOK_ENABLED=true` is set. No route setup needed, and no Storybook code ships to production.
16+
17+
However, if you’re using **Expo Router** and want to render Storybook within your app’s navigation (instead of as a separate entry point), follow our dedicated [Expo Router Setup guide](./expo-router.md). This approach is fully supported, but not recommended, because it embeds Storybook into your app’s bundle and navigation.
1618
:::
1719

1820
:::tip AI-Assisted Setup

β€Ždocs/docs/intro/getting-started/migrating-to-entry-point-swapping.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: [react native, storybook, migration, entry point swapping, withStorybo
66

77
# Migrating to Entry-Point Swapping
88

9-
Starting with v10.4, entry-point swapping is the default setup for new Storybook React Native projects. If your project uses the in-app integration approach β€” importing Storybook inside `App.tsx` and conditionally rendering it β€” that setup continues to work and is fully supported. However, entry-point swapping is simpler: the bundler swaps your app's entry point for Storybook's entry point automatically, so you don't need to touch your app code at all.
9+
Starting with v10.4, entry-point swapping is the default setup for new Storybook React Native projects. If your project uses the in-app integration approach, importing Storybook inside `App.tsx` and conditionally rendering it, that setup continues to work and is fully supported. However, entry-point swapping is simpler: the bundler swaps your app's entry point for Storybook's entry point automatically, so you don't need to touch your app code at all.
1010

1111
This guide walks you through the migration.
1212

β€Ždocs/docs/intro/getting-started/repack.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 3
44

55
# Re.Pack Setup
66

7-
This guide covers what's different when using [Re.Pack](https://re-pack.dev/) (Rspack/Webpack) instead of Metro. The Storybook configuration (`.rnstorybook` folder, stories, addons) is identical regardless of bundler β€” only the bundler config itself changes.
7+
This guide covers what's different when using [Re.Pack](https://re-pack.dev/) (Rspack/Webpack) instead of Metro. The Storybook configuration (`.rnstorybook` folder, stories, addons) is identical regardless of bundler, only the bundler config itself changes.
88

99
For a ready-to-go starter project, check out the [RepackStorybookStarter](https://github.com/dannyhw/RepackStorybookStarter) repository.
1010

0 commit comments

Comments
Β (0)