Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typo]: Possible incorrect info #6672

Open
xivilai opened this issue Mar 2, 2024 · 1 comment
Open

[Typo]: Possible incorrect info #6672

xivilai opened this issue Mar 2, 2024 · 1 comment

Comments

@xivilai
Copy link

xivilai commented Mar 2, 2024

Summary

In here: https://react.dev/reference/react/useLayoutEffect#parameters it says:

Before your component is added to the DOM, React will run your setup function

This seems to be incorrect

Page

https://react.dev/reference/react/useLayoutEffect#parameters

Details

No response

@rickhanlonii
Copy link
Member

It runs after mutations but before paint. I guess this is technically after it's added to the DOM, which is relevant since if you're going to read layout (the purpose of the API) you need it to be after mutations. But I guess it depends on whether "added to the DOM" includes paint. @gaearon what did you mean here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants