Intro Focus Management
(See readme.mdx)With flushSync, we can ensure that the DOM is updated before we try to focus the input.
This is kind of a de-optimization. You should NOT be using this a lot of places. It is useful for focus management.
Not trying guessing with setTimeout() or requestAnimationFrame() to wait for the DOM to update before focusing the input. flushSync() is the way to go!