Skip to content

Commit 37b09ea

Browse files
authored
fix: typo in docs on prerendering (#7823)
1 parent c60173f commit 37b09ea

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/content/reference/react-dom/static/prerender.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
6868
6969
#### Caveats {/*caveats*/}
7070
71-
`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.
71+
`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.
7272
7373
7474
<Note>
@@ -231,7 +231,7 @@ async function renderToString() {
231231
const {prelude} = await prerender(<App />, {
232232
bootstrapScripts: ['/main.js']
233233
});
234-
234+
235235
const reader = prelude.getReader();
236236
let content = '';
237237
while (true) {
@@ -317,7 +317,6 @@ Any Suspense boundaries with incomplete children will be included in the prelude
317317
318318
### My stream doesn't start until the entire app is rendered {/*my-stream-doesnt-start-until-the-entire-app-is-rendered*/}
319319
320-
The `prerender` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
320+
The `prerender` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
321321
322322
To stream content as it loads, use a streaming server render API like [renderToReadableStream](/reference/react-dom/server/renderToReadableStream).
323-

src/content/reference/react-dom/static/prerenderToNodeStream.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
6969
7070
#### Caveats {/*caveats*/}
7171
72-
`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.
72+
`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.
7373
7474
<Note>
7575
@@ -95,7 +95,7 @@ app.use('/', async (request, response) => {
9595
const { prelude } = await prerenderToNodeStream(<App />, {
9696
bootstrapScripts: ['/main.js'],
9797
});
98-
98+
9999
response.setHeader('Content-Type', 'text/plain');
100100
prelude.pipe(response);
101101
});
@@ -232,7 +232,7 @@ async function renderToString() {
232232
const {prelude} = await prerenderToNodeStream(<App />, {
233233
bootstrapScripts: ['/main.js']
234234
});
235-
235+
236236
return new Promise((resolve, reject) => {
237237
let data = '';
238238
prelude.on('data', chunk => {
@@ -320,4 +320,3 @@ Any Suspense boundaries with incomplete children will be included in the prelude
320320
The `prerenderToNodeStream` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
321321
322322
To stream content as it loads, use a streaming server render API like [renderToPipeableStream](/reference/react-dom/server/renderToPipeableStream).
323-

0 commit comments

Comments
 (0)