Reference

useLayoutEffect

Runs a layout effect after DOM mutations and before normal effects.

Signature

function useLayoutEffect(callback: EffectCallback, deps?: readonly unknown[]): void