Commit 4eeee35
authored
[SuspenseList] Store lastEffect before rendering (#17131)
* Add a failing test for SuspenseList bug
* Store lastEffect before rendering
We can't reset the effect list to null because we don't rereconcile the
children so we drop deletion effects if we do that.
Instead we store the last effect as it was before we started rendering
so we can go back to where it was when we reset it.
We actually already do something like this when we delete the last row
for the tail="hidden" mode so we had a field available for it already.1 parent 4fb5bf6 commit 4eeee35
File tree
3 files changed
+96
-3
lines changed- packages/react-reconciler/src
- __tests__
3 files changed
+96
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2355 | 2355 | | |
2356 | 2356 | | |
2357 | 2357 | | |
| 2358 | + | |
2358 | 2359 | | |
2359 | 2360 | | |
2360 | 2361 | | |
2361 | 2362 | | |
2362 | | - | |
| 2363 | + | |
2363 | 2364 | | |
2364 | 2365 | | |
2365 | 2366 | | |
2366 | 2367 | | |
2367 | 2368 | | |
2368 | 2369 | | |
2369 | | - | |
| 2370 | + | |
| 2371 | + | |
2370 | 2372 | | |
2371 | 2373 | | |
2372 | 2374 | | |
| |||
2375 | 2377 | | |
2376 | 2378 | | |
2377 | 2379 | | |
| 2380 | + | |
2378 | 2381 | | |
2379 | 2382 | | |
2380 | 2383 | | |
| |||
2456 | 2459 | | |
2457 | 2460 | | |
2458 | 2461 | | |
| 2462 | + | |
2459 | 2463 | | |
2460 | 2464 | | |
2461 | 2465 | | |
| |||
2487 | 2491 | | |
2488 | 2492 | | |
2489 | 2493 | | |
| 2494 | + | |
2490 | 2495 | | |
2491 | 2496 | | |
2492 | 2497 | | |
| |||
2497 | 2502 | | |
2498 | 2503 | | |
2499 | 2504 | | |
| 2505 | + | |
2500 | 2506 | | |
2501 | 2507 | | |
2502 | 2508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1057 | 1060 | | |
1058 | 1061 | | |
1059 | 1062 | | |
| |||
Lines changed: 84 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
588 | 672 | | |
589 | 673 | | |
590 | 674 | | |
| |||
0 commit comments