useUnmount
A hook to run a function when the component unmounts
Installation
npx shadcn@latest add @shadcnhooks/use-unmountAPI
/**
* A hook to run a function when the component unmounts
* @param fn - The function to run when the component unmounts
* @returns The function to run when the component unmounts
*/
export function useUnmount(fn: () => void): voidCredits
Last updated on