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
UNSTABLE RSC FRAMEWORK MODE BREAKING CHANGE - Existing route module exports remain unchanged from stable v7 non-RSC mode, but new exports are added for RSC mode. If you want to use RSC features, you will need to update your route modules to export the new annotations.
7
+
8
+
If you are using RSC framework mode currently, you will need to update your route modules to the new conventions. The following route module components have their own mutually exclusive server component counterparts:
9
+
10
+
| Server Component Export | Client Component |
11
+
| ----------------------- | ----------------- |
12
+
|`ServerComponent`|`default`|
13
+
|`ServerErrorBoundary`|`ErrorBoundary`|
14
+
|`ServerLayout`|`Layout`|
15
+
|`ServerHydrateFallback`|`HydrateFallback`|
16
+
17
+
If you were previously exporting a `ServerComponent`, your `ErrorBoundary`, `Layout`, and `HydrateFallback` were also server components. If you want to keep those as server components, you can rename them and prefix them with `Server`. If you were previously importing the implementations of those components from a client module, you can simply inline them.
- Server Functions (via [`"use server"`][use-server-docs] directive)
41
41
@@ -171,9 +171,18 @@ export default function Route({
171
171
}
172
172
```
173
173
174
-
### Server Component Routes
174
+
### Route Server Components
175
+
176
+
If a route exports a `ServerComponent` instead of the typical `default` component export, this will be a server component rather than the usual client component. A default export and `ServerComponent` can not both be exported from the same route module, but you can still export client-only annotations like `clientLoader` and `clientAction` alongside a `ServerComponent`, along with any other component exports such as `ErrorBoundary` or `Layout`.
175
177
176
-
If a route exports a `ServerComponent` instead of the typical `default` component export, this component along with other route components (`ErrorBoundary`, `HydrateFallback`, `Layout`) will be server components rather than the usual client components.
178
+
The following route module components have their own mutually exclusive server component counterparts:
179
+
180
+
| Server Component Export | Client Component |
181
+
| ----------------------- | ----------------- |
182
+
|`ServerComponent`|`default`|
183
+
|`ServerErrorBoundary`|`ErrorBoundary`|
184
+
|`ServerLayout`|`Layout`|
185
+
|`ServerHydrateFallback`|`HydrateFallback`|
177
186
178
187
```tsx
179
188
importtype { Route } from"./+types/route";
@@ -188,7 +197,7 @@ export async function loader() {
0 commit comments