( request: Request, boundary: SuspenseBoundary, )
| 455 | } |
| 456 | |
| 457 | function isEligibleForOutlining( |
| 458 | request: Request, |
| 459 | boundary: SuspenseBoundary, |
| 460 | ): boolean { |
| 461 | // For very small boundaries, don't bother producing a fallback for outlining. |
| 462 | // The larger this limit is, the more we can save on preparing fallbacks in case we end up |
| 463 | // outlining. |
| 464 | return ( |
| 465 | (boundary.byteSize > 500 || hasSuspenseyContent(boundary.contentState)) && |
| 466 | // For boundaries that can possibly contribute to the preamble we don't want to outline |
| 467 | // them regardless of their size since the fallbacks should only be emitted if we've |
| 468 | // errored the boundary. |
| 469 | boundary.contentPreamble === null |
| 470 | ); |
| 471 | } |
| 472 | |
| 473 | function defaultErrorHandler(error: mixed) { |
| 474 | if ( |
no test coverage detected