Commit 88050a4
committed
[WIP] Schedule prerender after something suspends
Part of a series of PRs related to sibling prerendering. I have the
implementation working locally, but still working on splitting it up
into a reasonable sequence of steps so we can land it incrementally.
There's likely to be some regressions due to the scope of the change,
so I've also done my best to keep the change behind a feature flag.
Opening this in draft mode while I continue to work on updating the
test suite, which requires many changes.
---
Adds the concept of a "prerender". These special renders are spawned
whenever something suspends (and we're not already prerendering).
The purpose is to move speculative rendering work into a separate
phase that does not block the UI from updating. For example, during a
transition, if something suspends, we should not speculatively
prerender siblings that will be replaced by a fallback in the UI until
*after* the fallback has been shown to the user.1 parent 62c8c03 commit 88050a4
File tree
19 files changed
+687
-79
lines changed- packages
- react-cache/src/__tests__
- react-dom/src/__tests__
- react-reconciler/src
- __tests__
19 files changed
+687
-79
lines changedLines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
152 | 160 | | |
153 | 161 | | |
154 | 162 | | |
| |||
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| 202 | + | |
194 | 203 | | |
195 | 204 | | |
196 | 205 | | |
| |||
206 | 215 | | |
207 | 216 | | |
208 | 217 | | |
209 | | - | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | | - | |
213 | | - | |
| 221 | + | |
| 222 | + | |
214 | 223 | | |
215 | 224 | | |
216 | | - | |
217 | | - | |
218 | 225 | | |
219 | 226 | | |
220 | 227 | | |
| |||
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
270 | 283 | | |
271 | 284 | | |
272 | 285 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
244 | 253 | | |
245 | 254 | | |
246 | 255 | | |
247 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
248 | 262 | | |
249 | 263 | | |
250 | 264 | | |
251 | 265 | | |
| 266 | + | |
252 | 267 | | |
253 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
254 | 275 | | |
255 | 276 | | |
256 | 277 | | |
| |||
335 | 356 | | |
336 | 357 | | |
337 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
338 | 374 | | |
339 | 375 | | |
340 | 376 | | |
| |||
670 | 706 | | |
671 | 707 | | |
672 | 708 | | |
| 709 | + | |
673 | 710 | | |
674 | 711 | | |
675 | 712 | | |
676 | 713 | | |
677 | 714 | | |
678 | 715 | | |
679 | 716 | | |
| 717 | + | |
680 | 718 | | |
681 | 719 | | |
682 | 720 | | |
683 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
684 | 730 | | |
685 | 731 | | |
686 | 732 | | |
| |||
700 | 746 | | |
701 | 747 | | |
702 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
703 | 752 | | |
704 | 753 | | |
705 | 754 | | |
| |||
714 | 763 | | |
715 | 764 | | |
716 | 765 | | |
| 766 | + | |
717 | 767 | | |
718 | 768 | | |
719 | 769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
0 commit comments