Commit 018267d
committed
[Fizz] hoistables should never flush before the preamble
Hoistables should never flush before the preamble however there is a surprisingly easy way to trigger this to happen by suspending in the shell of the app. This change modifies the flushing behavior to not emit any hoistables before the preamble has written. It accomplishes this by aborting the flush early if there are any pending root tasks remaining. It's unforunate we need this extra condition but it's essential that we don't emit anything before the preamble and at the moment I don't see a way to do that without introducing a new condition.1 parent dc6a7e0 commit 018267d
3 files changed
Lines changed: 64 additions & 9 deletions
File tree
- packages
- react-dom/src/__tests__
- react-server/src
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6926 | 6926 | | |
6927 | 6927 | | |
6928 | 6928 | | |
6929 | | - | |
| 6929 | + | |
| 6930 | + | |
| 6931 | + | |
| 6932 | + | |
| 6933 | + | |
| 6934 | + | |
| 6935 | + | |
| 6936 | + | |
6930 | 6937 | | |
6931 | 6938 | | |
6932 | 6939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5034 | 5034 | | |
5035 | 5035 | | |
5036 | 5036 | | |
| 5037 | + | |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
| 5041 | + | |
| 5042 | + | |
| 5043 | + | |
| 5044 | + | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
| 5063 | + | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
5037 | 5082 | | |
5038 | 5083 | | |
5039 | 5084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4057 | 4057 | | |
4058 | 4058 | | |
4059 | 4059 | | |
| 4060 | + | |
| 4061 | + | |
| 4062 | + | |
| 4063 | + | |
| 4064 | + | |
4060 | 4065 | | |
4061 | 4066 | | |
4062 | 4067 | | |
4063 | 4068 | | |
4064 | 4069 | | |
4065 | 4070 | | |
4066 | | - | |
4067 | | - | |
4068 | | - | |
4069 | | - | |
4070 | | - | |
4071 | | - | |
4072 | | - | |
4073 | | - | |
4074 | 4071 | | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
4075 | 4077 | | |
| 4078 | + | |
4076 | 4079 | | |
4077 | 4080 | | |
4078 | 4081 | | |
| |||
0 commit comments