Verified Commit ffe7be76 authored by Florent Chehab's avatar Florent Chehab
Browse files

feat(hook): added useOnComponentUnMount

parent 223eb05c
import { useEffect } from "react";
/**
* Hook to run a method on component un-mount.
*
* @param {Function} execOnUnMount
*/
function useOnComponentUnMount(execOnUnMount) {
useEffect(() => {
return execOnUnMount;
}, []);
}
export default useOnComponentUnMount;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment