* Extract `act` environment check into function `act` checks the environment to determine whether to fire a warning. We're changing how this check works in React 18. As a first step, this refactors the logic into a single function. No behavior changes yet. * Use IS_REACT_ACT_ENVIRONMENT to disable warnings If `IS_REACT_ACT_ENVIRONMENT` is set to `false`, we will suppress any `act` warnings. Otherwise, the behavior of `act` is the same as in React 17: if `jest` is defined, it warns. In concurrent mode, the plan is to remove the `jest` check and only warn if `IS_REACT_ACT_ENVIRONMENT` is true. I have not implemented that part yet. |
||
|---|---|---|
| .. | ||
| babel | ||
| bench | ||
| circleci | ||
| devtools | ||
| error-codes | ||
| eslint | ||
| eslint-rules | ||
| flow | ||
| git | ||
| jest | ||
| merge-fork | ||
| perf-counters | ||
| prettier | ||
| print-warnings | ||
| release | ||
| rollup | ||
| shared | ||
| tasks | ||
| yarn | ||
| authors | ||