( children: ReactNodeList, resumableState: ResumableState, renderState: RenderState, rootFormatContext: FormatContext, progressiveChunkSize: void | number, onError: void | ((error: mixed, errorInfo: ErrorInfo) => ?string), onAllReady: void | (() => void), onShellReady: void | (() => void), onShellError: void | ((error: mixed) => void), onFatalError: void | ((error: mixed) => void), onPostpone: void | ((reason: string, postponeInfo: PostponeInfo) => void), formState: void | null | ReactFormState<any, any>, )
| 537 | } |
| 538 | |
| 539 | export function createRequest( |
| 540 | children: ReactNodeList, |
| 541 | resumableState: ResumableState, |
| 542 | renderState: RenderState, |
| 543 | rootFormatContext: FormatContext, |
| 544 | progressiveChunkSize: void | number, |
| 545 | onError: void | ((error: mixed, errorInfo: ErrorInfo) => ?string), |
| 546 | onAllReady: void | (() => void), |
| 547 | onShellReady: void | (() => void), |
| 548 | onShellError: void | ((error: mixed) => void), |
| 549 | onFatalError: void | ((error: mixed) => void), |
| 550 | onPostpone: void | ((reason: string, postponeInfo: PostponeInfo) => void), |
| 551 | formState: void | null | ReactFormState<any, any>, |
| 552 | ): Request { |
| 553 | if (__DEV__) { |
| 554 | resetOwnerStackLimit(); |
| 555 | } |
| 556 | |
| 557 | // $FlowFixMe[invalid-constructor]: the shapes are exact here but Flow doesn't like constructors |
| 558 | const request: Request = new RequestInstance( |
| 559 | resumableState, |
| 560 | renderState, |
| 561 | rootFormatContext, |
| 562 | progressiveChunkSize, |
| 563 | onError, |
| 564 | onAllReady, |
| 565 | onShellReady, |
| 566 | onShellError, |
| 567 | onFatalError, |
| 568 | onPostpone, |
| 569 | formState, |
| 570 | ); |
| 571 | |
| 572 | // This segment represents the root fallback. |
| 573 | const rootSegment = createPendingSegment( |
| 574 | request, |
| 575 | 0, |
| 576 | null, |
| 577 | rootFormatContext, |
| 578 | // Root segments are never embedded in Text on either edge |
| 579 | false, |
| 580 | false, |
| 581 | ); |
| 582 | // There is no parent so conceptually, we're unblocked to flush this segment. |
| 583 | rootSegment.parentFlushed = true; |
| 584 | const rootTask = createRenderTask( |
| 585 | request, |
| 586 | null, |
| 587 | children, |
| 588 | -1, |
| 589 | null, |
| 590 | rootSegment, |
| 591 | null, |
| 592 | null, |
| 593 | request.abortableTasks, |
| 594 | null, |
| 595 | rootFormatContext, |
| 596 | rootContextSnapshot, |
no test coverage detected