Skip to content

Conversation

@jukben
Copy link
Contributor

@jukben jukben commented Apr 4, 2025

This PR adds documentation about the microtask scheduling behavior of createRoot().render(), as requested in #7317 and confirmed by the React team in facebook/react#32811.

The documentation clarifies that while rendering is synchronous once it starts, the render() call itself is scheduled in a microtask, similar to how setState works. This can be important when integrating with code that depends on precise effect timing (remix-run/react-router#12459)

Fixes #7317
Closes facebook/react#32811

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@eps1lon eps1lon merged commit e148ffe into reactjs:main Apr 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants