UNPKG

@refinedev/core

Version:

refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.

11 lines (10 loc) 428 B
/** * Delays the execution of a callback function asynchronously. * This utility function is used to defer the execution of the provided * callback, allowing the current call stack to clear before the callback * is invoked. It is particularly useful for ensuring non-blocking behavior * and providing a clear intent when a 0 ms timeout is used. */ export const deferExecution = (fn: Function) => { setTimeout(fn, 0); };