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: src/content/reference/react-dom/static/prerender.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
71
71
<<<<<<< HEAD
72
72
<<<<<<< HEAD
73
73
<<<<<<< HEAD
74
+
<<<<<<< HEAD
74
75
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the a nonce value in the prerender itself.
75
76
=======
76
77
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
@@ -81,6 +82,9 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
81
82
=======
82
83
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
83
84
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
85
+
=======
86
+
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/static/prerenderToNodeStream.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,7 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
72
72
<<<<<<< HEAD
73
73
<<<<<<< HEAD
74
74
<<<<<<< HEAD
75
+
<<<<<<< HEAD
75
76
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the a nonce value in the prerender itself.
76
77
=======
77
78
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
@@ -82,6 +83,9 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
82
83
=======
83
84
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
84
85
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
86
+
=======
87
+
`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
Copy file name to clipboardExpand all lines: src/content/reference/rsc/directives.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Directives are for use in [React Server Components](/reference/rsc/server-compon
10
10
11
11
<Intro>
12
12
13
-
Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks).
13
+
Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#full-stack-frameworks).
Copy file name to clipboardExpand all lines: src/content/reference/rsc/server-components.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Server Components
4
4
5
5
<RSC>
6
6
7
-
Server Components are for use in [React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks).
7
+
Server Components are for use in [React Server Components](/learn/start-a-new-react-project#full-stack-frameworks).
8
8
9
9
</RSC>
10
10
@@ -22,7 +22,7 @@ This separate environment is the "server" in React Server Components. Server Com
22
22
23
23
#### How do I build support for Server Components? {/*how-do-i-build-support-for-server-components*/}
24
24
25
-
While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.
25
+
While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.
26
26
27
27
To support React Server Components as a bundler or framework, we recommend pinning to a specific React version, or using the Canary release. We will continue working with bundlers and frameworks to stabilize the APIs used to implement React Server Components in the future.
28
28
@@ -45,7 +45,7 @@ function Page({page}) {
45
45
setContent(data.content);
46
46
});
47
47
}, [page]);
48
-
48
+
49
49
return<div>{sanitizeHtml(marked(content))}</div>;
50
50
}
51
51
```
@@ -69,7 +69,7 @@ import sanitizeHtml from 'sanitize-html'; // Not included in bundle
69
69
asyncfunctionPage({page}) {
70
70
// NOTE: loads *during* render, when the app is built.
71
71
constcontent=awaitfile.readFile(`${page}.md`);
72
-
72
+
73
73
return<div>{sanitizeHtml(marked(content))}</div>;
74
74
}
75
75
```
@@ -113,7 +113,7 @@ function Note({id}) {
113
113
setNote(data.note);
114
114
});
115
115
}, [id]);
116
-
116
+
117
117
return (
118
118
<div>
119
119
<Author id={note.authorId} />
@@ -253,7 +253,7 @@ This works by first rendering `Notes` as a Server Component, and then instructin
253
253
<p>this is the second note</p>
254
254
</Expandable>
255
255
<!--...-->
256
-
</div>
256
+
</div>
257
257
</body>
258
258
```
259
259
@@ -270,8 +270,8 @@ import db from './database';
270
270
asyncfunctionPage({id}) {
271
271
// Will suspend the Server Component.
272
272
constnote=awaitdb.notes.get(id);
273
-
274
-
// NOTE: not awaited, will start here and await on the client.
273
+
274
+
// NOTE: not awaited, will start here and await on the client.
Copy file name to clipboardExpand all lines: src/content/reference/rsc/server-functions.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ To support Server Functions as a bundler or framework, we recommend pinning to a
31
31
<<<<<<< HEAD
32
32
<<<<<<< HEAD
33
33
<<<<<<< HEAD
34
+
<<<<<<< HEAD
34
35
When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the server function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
35
36
=======
36
37
When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the Server Function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
@@ -41,6 +42,9 @@ When a Server Function is defined with the [`"use server"`](/reference/rsc/use-s
41
42
=======
42
43
When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the Server Function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
43
44
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
45
+
=======
46
+
When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the Server Function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
47
+
>>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619
44
48
45
49
Server Functions can be created in Server Components and passed as props to Client Components, or they can be imported and used in Client Components.
Copy file name to clipboardExpand all lines: src/content/reference/rsc/use-client.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ export default function RichTextEditor({ timestamp, text }) {
41
41
}
42
42
```
43
43
44
-
When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) will treat the module import as a boundary between server-run and client-run code.
44
+
When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#full-stack-frameworks) will treat the module import as a boundary between server-run and client-run code.
45
45
46
46
As dependencies of `RichTextEditor`, `formatDate` and `Button` will also be evaluated on the client regardless of whether their modules contain a `'use client'` directive. Note that a single module may be evaluated on the server when imported from server code and on the client when imported from client code.
0 commit comments