← React Intermediate Questions - Set 10 Q94

What is the difference between `useEffect` and `useLayoutEffect`?

React Intermediate Questions - Set 10

Example

useLayoutEffect(() => { setW(el.current.offsetWidth); }, []);
useEffect(() => { track('view'); }, []);

What to notice

← Back to the question list