import { flushSync } from 'react-dom';
flushSync(() => {
currentEl.focus();
setFocused(false);
});
view raw flushSync.ts hosted with ❤ by GitHub