useLayoutEffect: If you need to mutate the DOM and/or DO need to perform measurementsuseEffect: If you don’t need to interact with the DOM at all or your DOM changes are unobservable. Read the full article