flush

Runs every queued observer and binding update now, instead of at the end of the microtask.

flush(): void
import { flush } from "https://realm.js.org/dist/index.js";

state.items.push(item);
flush();
// the DOM shows the new item here

Behaviour

Updated · Edit this page on GitHub · View as Markdown