useEffect docs suggest the effect always runs after paint, which is apparently not guaranteed. For example, when useLayoutEffect from the same render triggers an update, the effect must be flushed before that update, which is before paint (I wrote a post detailing this behavior). Folks in react/react#20863 discuss similar pitfalls.
Could we clarify the guarantees in the docs? I'd be glad to submit a PR if you confirm my understanding of the behavior.
useEffectdocs suggest the effect always runs after paint, which is apparently not guaranteed. For example, whenuseLayoutEffectfrom the same render triggers an update, the effect must be flushed before that update, which is before paint (I wrote a post detailing this behavior). Folks in react/react#20863 discuss similar pitfalls.Could we clarify the guarantees in the docs? I'd be glad to submit a PR if you confirm my understanding of the behavior.