Commit 8a347ed
Remove renderPhaseUpdates Map (#17484)
* Render phase updates can now be extracted from the pending queue
* Use a custom dispatcher for the second render pass
* Discard render phase updates if component throws
When aborting a render, we also need to throw out render phase updates.
Remove the updates from the queues so they do not persist to the next
render. We already did a single pass through the whole list of hooks, so
we know that any pending updates must have been dispatched during the
render phase. The ones that were dispatched before we started rendering
were already transferred to the current hook's queue.1 parent be603f5 commit 8a347ed
File tree
4 files changed
+444
-133
lines changed- packages/react-reconciler/src
- __tests__
4 files changed
+444
-133
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
1319 | 1319 | | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | | - | |
| 1322 | + | |
| 1323 | + | |
1323 | 1324 | | |
1324 | 1325 | | |
1325 | 1326 | | |
| |||
0 commit comments