amis-rpc-design/node_modules/react-redux/es/utils/batch.js

10 lines
359 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
// Default to a dummy "batch" implementation that just runs the callback
function defaultNoopBatch(callback) {
callback();
}
let batch = defaultNoopBatch; // Allow injecting another batching function later
export const setBatch = newBatch => batch = newBatch; // Supply a getter just to skip dealing with ESM bindings
export const getBatch = () => batch;