Commit 307c090
committed
Implement fallback children
When you pass a fallback to renderIntoDocument it will emit the fallback if the shell of the primary children errors. It is possible for the fallback to also error in the shell in which case the result is a fatalError as if you did not provide a fallback.
Included in this change is a refactoring of how preamble and postamble work. They are now interned within the resposneState where we can have more careful control over what is flushed and when.
There is also a new concept of an early preamble. the early preamble is the html and head tags plus any resources that can flush (most things plus stylesheets up to the first precedence)1 parent fc2b823 commit 307c090
9 files changed
Lines changed: 863 additions & 245 deletions
File tree
- packages
- react-dom-bindings/src/server
- react-dom/src/__tests__
- react-native-renderer/src/server
- react-noop-renderer/src
- react-server/src
- forks
- scripts/error-codes
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| 166 | + | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| |||
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
488 | | - | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
496 | 503 | | |
497 | 504 | | |
498 | 505 | | |
| |||
0 commit comments