Konversi ComponentDidupDate menjadi EFFEFFECT

const hasMount = useRef(false)

useEffect(() => {
  if (hasMount.current) {
    // code to run when the component is updated
  } else {
    hasMount.current = true
  }
}, /* dependencies */)`
Vast Vulture