UNPKG

flipper-plugin

Version:

Flipper Desktop plugin SDK and components

28 lines 739 B
"use strict"; /** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ Object.defineProperty(exports, "__esModule", { value: true }); exports.batch = exports.batched = void 0; const react_dom_1 = require("react-dom"); function batched(fn) { return function () { let res; (0, react_dom_1.unstable_batchedUpdates)(() => { // eslint-disable-next-line res = fn.apply(this, arguments); }); return res; }; } exports.batched = batched; function batch(fn) { batched(fn)(); } exports.batch = batch; //# sourceMappingURL=batch.js.map