useEffect Hook
useEffect defers a side effect to run after the commit phase, once the DOM reflects the render that scheduled it — synchronization with an external system, not a lifecycle-method substitute. Effects run asynchronously after paint; useLayoutEffect is the synchronous-before-paint variant for measuring the DOM.
This Concept is waiting for its first lesson!
useEffect defers a side effect to run after the commit phase, once the DOM reflects the render that scheduled it — synchronization with an external system, not a lifecycle-method substitute. Effects run asynchronously after paint; useLayoutEffect is the synchronous-before-paint variant for measuring the DOM.
Are you a teacher? Sign in to start contributing.
Sign In