FlushSync is used to force React to update the DOM synchronously rather than queueing it up. It's pretty rare to need this case but good to keep in mind. --- Docs - https://react.dev/reference/react-dom/flushSync