Commit 702fc98
authored
Codemod act -> await act (4/?) (#26338)
Similar to the rationale for `waitFor` (see #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 9fb2469 commit 702fc98
File tree
18 files changed
+907
-1075
lines changed- packages
- react-debug-tools/src/__tests__
- react-dom/src
- __tests__/utils
- events/__tests__
- react-reconciler/src/__tests__
- react-refresh/src/__tests__
- react/src/__tests__
18 files changed
+907
-1075
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
| 987 | + | |
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| |||
Lines changed: 20 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | | - | |
1073 | | - | |
| 1072 | + | |
| 1073 | + | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | | - | |
1228 | | - | |
| 1227 | + | |
| 1228 | + | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
1310 | | - | |
| 1309 | + | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | | - | |
1379 | | - | |
| 1378 | + | |
| 1379 | + | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
| |||
1469 | 1469 | | |
1470 | 1470 | | |
1471 | 1471 | | |
1472 | | - | |
1473 | | - | |
| 1472 | + | |
| 1473 | + | |
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
| |||
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | | - | |
1517 | | - | |
| 1516 | + | |
| 1517 | + | |
1518 | 1518 | | |
1519 | 1519 | | |
1520 | 1520 | | |
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
1600 | | - | |
| 1599 | + | |
| 1600 | + | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | 1603 | | |
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | | - | |
| 1621 | + | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
| |||
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
1648 | 1646 | | |
1649 | 1647 | | |
1650 | 1648 | | |
| |||
2833 | 2831 | | |
2834 | 2832 | | |
2835 | 2833 | | |
2836 | | - | |
| 2834 | + | |
2837 | 2835 | | |
2838 | 2836 | | |
2839 | 2837 | | |
| |||
2842 | 2840 | | |
2843 | 2841 | | |
2844 | 2842 | | |
2845 | | - | |
| 2843 | + | |
2846 | 2844 | | |
2847 | 2845 | | |
2848 | 2846 | | |
| |||
0 commit comments