Commit db2a3e3
committed
Codemod act -> await act (4/?)
Similar to the rationale for `waitFor` (see facebook#26285), we should always
await the result of an `act` call so that microtasks have a chance to
fire.
This only affects the internal `act` that we use in our repo, for now.
In the public `act` API, we don't yet require this; however, we
effectively will for any update that triggers suspense once `use` lands.
So we likely will start warning in an upcoming minor.1 parent 161f6ae commit db2a3e3
File tree
12 files changed
+769
-955
lines changed- packages
- react-dom/src
- __tests__/utils
- events/__tests__
- react-reconciler/src/__tests__
12 files changed
+769
-955
lines changedLines changed: 10 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
| |||
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2520 | 2520 | | |
2521 | 2521 | | |
2522 | 2522 | | |
2523 | | - | |
| 2523 | + | |
2524 | 2524 | | |
2525 | 2525 | | |
2526 | 2526 | | |
| |||
2575 | 2575 | | |
2576 | 2576 | | |
2577 | 2577 | | |
2578 | | - | |
| 2578 | + | |
2579 | 2579 | | |
2580 | 2580 | | |
2581 | 2581 | | |
| |||
2587 | 2587 | | |
2588 | 2588 | | |
2589 | 2589 | | |
2590 | | - | |
| 2590 | + | |
2591 | 2591 | | |
2592 | 2592 | | |
2593 | 2593 | | |
| |||
2604 | 2604 | | |
2605 | 2605 | | |
2606 | 2606 | | |
2607 | | - | |
| 2607 | + | |
2608 | 2608 | | |
2609 | 2609 | | |
2610 | 2610 | | |
| |||
2661 | 2661 | | |
2662 | 2662 | | |
2663 | 2663 | | |
2664 | | - | |
| 2664 | + | |
2665 | 2665 | | |
2666 | 2666 | | |
2667 | 2667 | | |
| |||
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | | - | |
| 2675 | + | |
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
| |||
2684 | 2684 | | |
2685 | 2685 | | |
2686 | 2686 | | |
2687 | | - | |
| 2687 | + | |
2688 | 2688 | | |
2689 | 2689 | | |
2690 | | - | |
| 2690 | + | |
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | 2694 | | |
2695 | 2695 | | |
2696 | 2696 | | |
2697 | | - | |
| 2697 | + | |
2698 | 2698 | | |
2699 | 2699 | | |
2700 | 2700 | | |
| |||
2726 | 2726 | | |
2727 | 2727 | | |
2728 | 2728 | | |
2729 | | - | |
| 2729 | + | |
2730 | 2730 | | |
2731 | 2731 | | |
2732 | 2732 | | |
| |||
2737 | 2737 | | |
2738 | 2738 | | |
2739 | 2739 | | |
2740 | | - | |
| 2740 | + | |
2741 | 2741 | | |
2742 | 2742 | | |
2743 | 2743 | | |
| |||
0 commit comments