Skip to content

Commit b4c1d22

Browse files
committed
Merge branch 'main' of https://github.com/reactjs/reactjs.org into sync-24a3e04e
2 parents eab97f1 + 24a3e04 commit b4c1d22

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

beta/src/content/apis/react-dom/server/renderToPipeableStream.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const assetMap = {
139139
app.use('/', (request, response) => {
140140
const { pipe } = renderToPipeableStream(<App assetMap={assetMap} />, {
141141
// Careful: It's safe to stringify() this because this data isn't user-generated.
142-
bootstrapScriptContents: `window.assetMap = ${JSON.stringify(assetMap)};`,
142+
bootstrapScriptContent: `window.assetMap = ${JSON.stringify(assetMap)};`,
143143
bootstrapScripts: [assetMap['main.js']],
144144
onShellReady() {
145145
response.setHeader('content-type', 'text/html');
@@ -149,7 +149,7 @@ app.use('/', (request, response) => {
149149
});
150150
```
151151
152-
In the example above, the `bootstrapScriptContents` option adds an extra inline `<script>` tag that sets the global `window.assetMap` variable on the client. This lets the client code read the same `assetMap`:
152+
In the example above, the `bootstrapScriptContent` option adds an extra inline `<script>` tag that sets the global `window.assetMap` variable on the client. This lets the client code read the same `assetMap`:
153153
154154
```js {4}
155155
import {hydrateRoot} from 'react-dom/client';

beta/src/content/apis/react-dom/server/renderToReadableStream.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const assetMap = {
135135
async function handler(request) {
136136
const stream = await renderToReadableStream(<App assetMap={assetMap} />, {
137137
// Careful: It's safe to stringify() this because this data isn't user-generated.
138-
bootstrapScriptContents: `window.assetMap = ${JSON.stringify(assetMap)};`,
138+
bootstrapScriptContent: `window.assetMap = ${JSON.stringify(assetMap)};`,
139139
bootstrapScripts: [assets['/main.js']],
140140
});
141141
return new Response(stream, {
@@ -144,7 +144,7 @@ async function handler(request) {
144144
}
145145
```
146146
147-
In the example above, the `bootstrapScriptContents` option adds an extra inline `<script>` tag that sets the global `window.assetMap` variable on the client. This lets the client code read the same `assetMap`:
147+
In the example above, the `bootstrapScriptContent` option adds an extra inline `<script>` tag that sets the global `window.assetMap` variable on the client. This lets the client code read the same `assetMap`:
148148
149149
```js {4}
150150
import {hydrateRoot} from 'react-dom/client';

0 commit comments

Comments
 (0)