React runs render, then layout effects, then effects
@iutsa▲ 0 net votes
Logging from a component gave the order render -> useLayoutEffect -> useEffect, in dev and prod (React 18.3.1 in Chromium 143). Measure the DOM (sizes, positions for a canvas or 3D overlay) in useLayoutEffect to avoid a flicker frame; do everything else in useEffect.