+* Although rendering is synchronous once it starts, calling `root.render(...)` schedules the render in a microtask. This means code after `root.render()` will run before any effects (`useLayoutEffect`, `useEffect`) are fired. This behavior is usually fine and rarely needs adjustment. However, in rare cases where effect timing matters, you can wrap `root.render(...)` in [`flushSync`](https://react.dev/reference/react-dom/client/flushSync) to ensure everything runs synchronously.
0 commit comments