Reference

flushSync

Runs updates synchronously and flushes pending reactive work before returning.

Signature

function flushSync<T>(callback: (): T): T