Commit 8df739c
committed
Bugfix: Remove extra render pass when reverting to client render (#26445)
(This was reviewed and approved as part of #26380; I'm extracting it
into its own PR so that it can bisected later if it causes an issue.)
I noticed while working on a PR that when an error happens during
hydration, and we revert to client rendering, React actually does _two_
additional render passes instead of just one. We didn't notice it
earlier because none of our tests happened to assert on how many renders
it took to recover, only on the final output.
It's possible this extra render pass had other consequences that I'm not
aware of, like messing with some assumption in the recoverable errors
logic.
This adds a test to demonstrate the issue. (One problem is that we don't
have much test coverage of this scenario in the first place, which
likely would have caught this earlier.)
DiffTrain build for commit 77ba161.1 parent 7d0009a commit 8df739c
File tree
12 files changed
+27
-27
lines changed- compiled-rn/facebook-fbsource/xplat/js
- RKJSModules/vendor
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer/implementations
12 files changed
+27
-27
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15116 | 15116 | | |
15117 | 15117 | | |
15118 | 15118 | | |
15119 | | - | |
| 15119 | + | |
15120 | 15120 | | |
15121 | 15121 | | |
15122 | 15122 | | |
| |||
23588 | 23588 | | |
23589 | 23589 | | |
23590 | 23590 | | |
23591 | | - | |
| 23591 | + | |
23592 | 23592 | | |
23593 | 23593 | | |
23594 | 23594 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4507 | 4507 | | |
4508 | 4508 | | |
4509 | 4509 | | |
4510 | | - | |
| 4510 | + | |
4511 | 4511 | | |
4512 | 4512 | | |
4513 | 4513 | | |
| |||
8561 | 8561 | | |
8562 | 8562 | | |
8563 | 8563 | | |
8564 | | - | |
| 8564 | + | |
8565 | 8565 | | |
8566 | 8566 | | |
8567 | 8567 | | |
| |||
8592 | 8592 | | |
8593 | 8593 | | |
8594 | 8594 | | |
8595 | | - | |
| 8595 | + | |
8596 | 8596 | | |
8597 | 8597 | | |
8598 | 8598 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4650 | 4650 | | |
4651 | 4651 | | |
4652 | 4652 | | |
4653 | | - | |
| 4653 | + | |
4654 | 4654 | | |
4655 | 4655 | | |
4656 | 4656 | | |
| |||
8988 | 8988 | | |
8989 | 8989 | | |
8990 | 8990 | | |
8991 | | - | |
| 8991 | + | |
8992 | 8992 | | |
8993 | 8993 | | |
8994 | 8994 | | |
| |||
9019 | 9019 | | |
9020 | 9020 | | |
9021 | 9021 | | |
9022 | | - | |
| 9022 | + | |
9023 | 9023 | | |
9024 | 9024 | | |
9025 | 9025 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18687 | 18687 | | |
18688 | 18688 | | |
18689 | 18689 | | |
18690 | | - | |
| 18690 | + | |
18691 | 18691 | | |
18692 | 18692 | | |
18693 | 18693 | | |
| |||
26342 | 26342 | | |
26343 | 26343 | | |
26344 | 26344 | | |
26345 | | - | |
| 26345 | + | |
26346 | 26346 | | |
26347 | 26347 | | |
26348 | 26348 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5837 | 5837 | | |
5838 | 5838 | | |
5839 | 5839 | | |
5840 | | - | |
| 5840 | + | |
5841 | 5841 | | |
5842 | 5842 | | |
5843 | 5843 | | |
| |||
9496 | 9496 | | |
9497 | 9497 | | |
9498 | 9498 | | |
9499 | | - | |
| 9499 | + | |
9500 | 9500 | | |
9501 | 9501 | | |
9502 | 9502 | | |
| |||
9538 | 9538 | | |
9539 | 9539 | | |
9540 | 9540 | | |
9541 | | - | |
| 9541 | + | |
9542 | 9542 | | |
9543 | 9543 | | |
9544 | 9544 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6107 | 6107 | | |
6108 | 6108 | | |
6109 | 6109 | | |
6110 | | - | |
| 6110 | + | |
6111 | 6111 | | |
6112 | 6112 | | |
6113 | 6113 | | |
| |||
10206 | 10206 | | |
10207 | 10207 | | |
10208 | 10208 | | |
10209 | | - | |
| 10209 | + | |
10210 | 10210 | | |
10211 | 10211 | | |
10212 | 10212 | | |
| |||
10261 | 10261 | | |
10262 | 10262 | | |
10263 | 10263 | | |
10264 | | - | |
| 10264 | + | |
10265 | 10265 | | |
10266 | 10266 | | |
10267 | 10267 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19347 | 19347 | | |
19348 | 19348 | | |
19349 | 19349 | | |
19350 | | - | |
| 19350 | + | |
19351 | 19351 | | |
19352 | 19352 | | |
19353 | 19353 | | |
| |||
27393 | 27393 | | |
27394 | 27394 | | |
27395 | 27395 | | |
27396 | | - | |
| 27396 | + | |
27397 | 27397 | | |
27398 | 27398 | | |
27399 | 27399 | | |
| |||
0 commit comments