MCPcopy Index your code
hub / github.com/react/react / writeBootstrap

Function writeBootstrap

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js:4465–4480  ·  view source on GitHub ↗
(
  destination: Destination,
  renderState: RenderState,
)

Source from the content-addressed store, hash-verified

4463}
4464
4465function writeBootstrap(
4466 destination: Destination,
4467 renderState: RenderState,
4468): boolean {
4469 const bootstrapChunks = renderState.bootstrapChunks;
4470 let i = 0;
4471 for (; i < bootstrapChunks.length - 1; i++) {
4472 writeChunk(destination, bootstrapChunks[i]);
4473 }
4474 if (i < bootstrapChunks.length) {
4475 const lastChunk = bootstrapChunks[i];
4476 bootstrapChunks.length = 0;
4477 return writeChunkAndReturn(destination, lastChunk);
4478 }
4479 return true;
4480}
4481
4482const shellTimeRuntimeScript = stringToPrecomputedChunk(markShellTime);
4483

Callers 2

writeCompletedRootFunction · 0.85

Calls 2

writeChunkFunction · 0.90
writeChunkAndReturnFunction · 0.90

Tested by

no test coverage detected