If useEffect updates layout after paint and the user sees the wrong position briefly, a layout effect may be appropriate.
Question 13 of 20 in useLayoutEffect Quiz