How to use queue-microtask - 1 common examples

To help you get started, we’ve selected a few queue-microtask examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alloc / wana / src / batch.ts View on Github external
function flushAsync() {
  if (!isQueued) {
    isQueued = true
    queueMicrotask(() => {
      isQueued = false
      if (flushSync()) {
        flushAsync()
      }
    })
  }
}

queue-microtask

fast, tiny `queueMicrotask` shim for modern engines

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis

Popular queue-microtask functions