Documentation
State
useUnMounted

useUnMounted

useUnMounted hook take a callback function as parameter and return a function that will be called when component is unmounted.

import { useUnMounted } from "@reactusehooks/core";
 useUnMounted(() => {
  console.log("unmounted");
});