Skip to content

Commit e0dfe30

Browse files
authored
docs(start): ssr inheritance (#4583)
1 parent fab63d9 commit e0dfe30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/start/framework/react/selective-ssr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ If validation fails, `status` will be `error` and `error` will contain the failu
155155

156156
### Inheritance
157157

158-
At runtime, a child route inherits the Selective SSR configuration of its parent. For example:
158+
At runtime, a child route inherits the Selective SSR configuration of its parent. However, the inherited value can only be changed to be more restrictive (i.e. `true` to `data-only` or `false` and `data-only` to `false`). For example:
159159

160160
```tsx
161161
root { ssr: undefined }
@@ -165,7 +165,7 @@ root { ssr: undefined }
165165

166166
- `root` defaults to `ssr: true`.
167167
- `posts` explicitly sets `ssr: false`, so neither `beforeLoad` nor `loader` will run on the server, and the route component won't be rendered on the server.
168-
- `$postId` sets `ssr: true`, but inherits `ssr: false` from its parent.
168+
- `$postId` sets `ssr: true`, but inherits `ssr: false` from its parent. Because the inherited value can only be changed to be more restrictive, `ssr: true` has no effect and the inherited `ssr: false` will remain.
169169

170170
Another example:
171171

@@ -179,7 +179,7 @@ root { ssr: undefined }
179179
- `root` defaults to `ssr: true`.
180180
- `posts` sets `ssr: 'data-only'`, so `beforeLoad` and `loader` run on the server, but the route component isn't rendered on the server.
181181
- `$postId` sets `ssr: true`, but inherits `ssr: 'data-only'` from its parent.
182-
- `details` sets `ssr: false`, so neither `beforeLoad` nor `loader` will run on the server, and the route component won't be rendered on the server.
182+
- `details` sets `ssr: false`, so neither `beforeLoad` nor `loader` will run on the server, and the route component won't be rendered on the server. Here the inherited value is changed to be more restrictive, and therefore, the `ssr: false` will override the inherited value.
183183

184184
## Fallback Rendering
185185

0 commit comments

Comments
 (0)