You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
506 B
15 lines
506 B
4 months ago
|
import { withCleanup } from "./withCleanup.js";
|
||
|
/**
|
||
|
* Temporarily disable act warnings.
|
||
|
*
|
||
|
* https://github.com/reactwg/react-18/discussions/102
|
||
|
*/
|
||
|
export function disableActWarnings() {
|
||
|
var prev = { prevActEnv: globalThis.IS_REACT_ACT_ENVIRONMENT };
|
||
|
globalThis.IS_REACT_ACT_ENVIRONMENT = false;
|
||
|
return withCleanup(prev, function (_a) {
|
||
|
var prevActEnv = _a.prevActEnv;
|
||
|
globalThis.IS_REACT_ACT_ENVIRONMENT = prevActEnv;
|
||
|
});
|
||
|
}
|
||
|
//# sourceMappingURL=disableActWarnings.js.map
|