MCPcopy
hub / github.com/facebook/react / flushPreamble

Function flushPreamble

packages/react-server/src/ReactFizzServer.js:5589–5610  ·  view source on GitHub ↗
(
  request: Request,
  destination: Destination,
  rootSegment: Segment,
  preambleSegments: Array<Array<Segment>>,
  skipBlockingShell: boolean,
)

Source from the content-addressed store, hash-verified

5587}
5588
5589function flushPreamble(
5590 request: Request,
5591 destination: Destination,
5592 rootSegment: Segment,
5593 preambleSegments: Array<Array<Segment>>,
5594 skipBlockingShell: boolean,
5595) {
5596 // The preamble is ready.
5597 writePreambleStart(
5598 destination,
5599 request.resumableState,
5600 request.renderState,
5601 skipBlockingShell,
5602 );
5603 for (let i = 0; i < preambleSegments.length; i++) {
5604 const segments = preambleSegments[i];
5605 for (let j = 0; j < segments.length; j++) {
5606 flushSegment(request, destination, segments[j], null);
5607 }
5608 }
5609 writePreambleEnd(destination, request.renderState);
5610}
5611
5612function flushSubtree(
5613 request: Request,

Callers 1

flushCompletedQueuesFunction · 0.85

Calls 3

writePreambleStartFunction · 0.90
writePreambleEndFunction · 0.90
flushSegmentFunction · 0.85

Tested by

no test coverage detected