Function leptos::queue_microtask

source ·
pub fn queue_microtask(task: impl FnOnce() + 'static)
Expand description

The microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the browser’s event loop.

Microtasks are especially useful for libraries and frameworks that need to perform final cleanup or other just-before-rendering tasks.

MDN queueMicrotask