UNPKG

@modern-kit/react

Version:
14 lines (12 loc) 418 B
/** * @description 컴포넌트가 언마운트될 때 특정 작업을 수행할 수 있게 해주는 훅입니다. * * @param {() => void} cleanup - 컴포넌트가 언마운트될 때 실행될 콜백 함수입니다. * * @example * useUnmount(() => { * console.log('컴포넌트가 언마운트되었습니다.'); * }); */ declare function useUnmount(cleanup: () => void): void; export { useUnmount };