( previousRow: null | SuspenseListRow, )
| 1888 | } |
| 1889 | |
| 1890 | function createSuspenseListRow( |
| 1891 | previousRow: null | SuspenseListRow, |
| 1892 | ): SuspenseListRow { |
| 1893 | const newRow: SuspenseListRow = { |
| 1894 | pendingTasks: 1, // At first the row is blocked on attempting rendering itself. |
| 1895 | boundaries: null, |
| 1896 | hoistables: createHoistableState(), |
| 1897 | inheritedHoistables: null, |
| 1898 | together: false, |
| 1899 | next: null, |
| 1900 | }; |
| 1901 | if (previousRow !== null && previousRow.pendingTasks > 0) { |
| 1902 | // If the previous row is not done yet, we add ourselves to be blocked on it. |
| 1903 | // When it finishes, we'll decrement our pending tasks. |
| 1904 | newRow.pendingTasks++; |
| 1905 | newRow.boundaries = []; |
| 1906 | previousRow.next = newRow; |
| 1907 | } |
| 1908 | return newRow; |
| 1909 | } |
| 1910 | |
| 1911 | function renderSuspenseListRows( |
| 1912 | request: Request, |
no test coverage detected