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

Function abortRemainingSuspenseBoundary

packages/react-server/src/ReactFizzServer.js:4541–4572  ·  view source on GitHub ↗
(
  request: Request,
  rootSegmentID: number,
  error: mixed,
  errorDigest: ?string,
  errorInfo: ThrownInfo,
  wasAborted: boolean,
)

Source from the content-addressed store, hash-verified

4539}
4540
4541function abortRemainingSuspenseBoundary(
4542 request: Request,
4543 rootSegmentID: number,
4544 error: mixed,
4545 errorDigest: ?string,
4546 errorInfo: ThrownInfo,
4547 wasAborted: boolean,
4548): void {
4549 const resumedBoundary = createSuspenseBoundary(
4550 request,
4551 null,
4552 new Set(),
4553 null,
4554 null,
4555 );
4556 resumedBoundary.parentFlushed = true;
4557 // We restore the same id of this boundary as was used during prerender.
4558 resumedBoundary.rootSegmentID = rootSegmentID;
4559
4560 resumedBoundary.status = CLIENT_RENDERED;
4561 encodeErrorForBoundary(
4562 resumedBoundary,
4563 errorDigest,
4564 error,
4565 errorInfo,
4566 wasAborted,
4567 );
4568
4569 if (resumedBoundary.parentFlushed) {
4570 request.clientRenderedBoundaries.push(resumedBoundary);
4571 }
4572}
4573
4574function abortRemainingReplayNodes(
4575 request: Request,

Callers 1

Calls 3

createSuspenseBoundaryFunction · 0.85
encodeErrorForBoundaryFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected