Skip to content

Commit 987bb1f

Browse files
committed
Disable in ReactMarkup
1 parent 613d43f commit 987bb1f

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5033,6 +5033,7 @@ export function writePreambleStart(
50335033
resumableState: ResumableState,
50345034
renderState: RenderState,
50355035
willFlushAllSegments: boolean,
5036+
skipExpect?: boolean, // Used as an override by ReactFizzConfigMarkup
50365037
): void {
50375038
// This function must be called exactly once on every request
50385039
if (
@@ -5118,7 +5119,7 @@ export function writePreambleStart(
51185119
renderState.bulkPreloads.forEach(flushResource, destination);
51195120
renderState.bulkPreloads.clear();
51205121

5121-
if (htmlChunks || headChunks) {
5122+
if ((htmlChunks || headChunks) && !skipExpect) {
51225123
// If we have any html or head chunks we know that we're rendering a full document.
51235124
// A full document should block display until the full shell has downloaded.
51245125
// Therefore we insert a render blocking instruction referring to the last body

packages/react-markup/src/ReactFizzConfigMarkup.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import type {
1717
FormatContext,
1818
} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
1919

20-
import {pushStartInstance as pushStartInstanceImpl} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
20+
import {
21+
pushStartInstance as pushStartInstanceImpl,
22+
writePreambleStart as writePreambleStartImpl,
23+
} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
2124

2225
import type {
2326
Destination,
@@ -62,13 +65,11 @@ export {
6265
writeEndPendingSuspenseBoundary,
6366
writeHoistablesForBoundary,
6467
writePlaceholder,
65-
writeCompletedRoot,
6668
createRootFormatContext,
6769
createRenderState,
6870
createResumableState,
6971
createPreambleState,
7072
createHoistableState,
71-
writePreambleStart,
7273
writePreambleEnd,
7374
writeHoistables,
7475
writePostamble,
@@ -203,5 +204,30 @@ export function writeEndClientRenderedSuspenseBoundary(
203204
return true;
204205
}
205206

207+
export function writePreambleStart(
208+
destination: Destination,
209+
resumableState: ResumableState,
210+
renderState: RenderState,
211+
willFlushAllSegments: boolean,
212+
skipExpect?: boolean, // Used as an override by ReactFizzConfigMarkup
213+
): void {
214+
return writePreambleStartImpl(
215+
destination,
216+
resumableState,
217+
renderState,
218+
willFlushAllSegments,
219+
true, // skipExpect
220+
);
221+
}
222+
223+
export function writeCompletedRoot(
224+
destination: Destination,
225+
resumableState: ResumableState,
226+
renderState: RenderState,
227+
): boolean {
228+
// Markup doesn't have any bootstrap scripts nor shell completions.
229+
return true;
230+
}
231+
206232
export type TransitionStatus = FormStatus;
207233
export const NotPendingTransition: TransitionStatus = NotPending;

0 commit comments

Comments
 (0)