Konversi componentwillunmount menjadi basa -basi

useEffect(() => {
  return () => {
    // code to run when the component is unmounted
  }
})
Vast Vulture