You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/start/framework/react/selective-ssr.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ If validation fails, `status` will be `error` and `error` will contain the failu
155
155
156
156
### Inheritance
157
157
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:
159
159
160
160
```tsx
161
161
root { ssr: undefined }
@@ -165,7 +165,7 @@ root { ssr: undefined }
165
165
166
166
-`root` defaults to `ssr: true`.
167
167
-`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.
169
169
170
170
Another example:
171
171
@@ -179,7 +179,7 @@ root { ssr: undefined }
179
179
-`root` defaults to `ssr: true`.
180
180
-`posts` sets `ssr: 'data-only'`, so `beforeLoad` and `loader` run on the server, but the route component isn't rendered on the server.
181
181
-`$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.
0 commit comments