UNPKG

@zenithui/utils

Version:

A collection of utility functions and hooks to simplify development in the ZenithUI ecosystem.

12 lines (11 loc) 308 B
/** * Custom hook that runs a cleanup function when the component is unmounted. * @param {() => void} func - The cleanup function to be executed on unmount. * @example * ```tsx * useUnmount(() => { * // Cleanup logic here * }); * ``` */ export default function useUnmount(func: () => void): void;