Hi there - nice-looking work so far! One little thing I noticed: I thinkuseEffect is meant to schedule the effect to run asynchronously, after rendering has completed (e.g. via requestAnimationFrame). useLayoutEffect and useMutationEffect run closer to the original render() function timing, but useEffect runs later.
(A quick trial with real React 16.7 alpha shows that work scheduled with useEffect runs after work scheduled with requestAnimationFrame, and definitely way after rendering.)
Hi there - nice-looking work so far! One little thing I noticed: I think
useEffect
is meant to schedule the effect to run asynchronously, after rendering has completed (e.g. viarequestAnimationFrame
).useLayoutEffect
anduseMutationEffect
run closer to the originalrender()
function timing, butuseEffect
runs later.(A quick trial with real React 16.7 alpha shows that work scheduled with
useEffect
runs after work scheduled withrequestAnimationFrame
, and definitely way after rendering.)