Question: When do you use `useLayoutEffect`?

  1. to optimize for all devices
  2. to complete the update
  3. to change the layout of the screen
  4. when you need the browser to paint before the effect runs

Answer: The correct answer of the above question is Option D:when you need the browser to paint before the effect runs