Commit 6c4bbc7
[Re-land] Make prerendering always non-blocking (#31268)
Follows #31238
___
This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.
Original PR: #31056
Original Commit:
4c71025
Revert PR: #31080
Commit description:
> When a synchronous update suspends, and we prerender the siblings, the
prerendering should be non-blocking so that we can immediately restart
once the data arrives.
>
> This happens automatically when there's a Suspense boundary, because
we immediately commit the boundary and then proceed to a Retry render,
which are always concurrent. When there's not a Suspense boundary, there
is no Retry, so we need to take care to switch from the synchronous work
loop to the concurrent one, to enable time slicing.
Co-authored-by: Andrew Clark <[email protected]>1 parent 8382581 commit 6c4bbc7
File tree
6 files changed
+278
-126
lines changed- packages
- react-dom/src/__tests__
- react-reconciler/src
- __tests__
6 files changed
+278
-126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | | - | |
| 768 | + | |
769 | 769 | | |
| 770 | + | |
| 771 | + | |
770 | 772 | | |
771 | 773 | | |
772 | 774 | | |
773 | | - | |
| 775 | + | |
774 | 776 | | |
775 | 777 | | |
776 | 778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
209 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
341 | 346 | | |
342 | 347 | | |
343 | 348 | | |
344 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
345 | 356 | | |
346 | 357 | | |
347 | 358 | | |
| |||
375 | 386 | | |
376 | 387 | | |
377 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
378 | 392 | | |
379 | | - | |
380 | | - | |
381 | 393 | | |
382 | 394 | | |
383 | 395 | | |
| |||
0 commit comments