If useEffect updates layout after paint and the user sees the wrong position briefly, a layout effect may be appropriate.