Files
NapCatQQ/.pnpm-store/v3/files/a3/ad14d350e10d0cc00e3b8f46d0991433115d096754d4e4ada13700744973067f2cd47b1bd758136727fa6f7e2679cc0acead56bbb127036953e955bcd60166
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
493 B
Plaintext

import { useEffect } from 'react';
import useLatest from '../useLatest';
import { isFunction } from '../utils';
import isDev from '../utils/isDev';
var useUnmount = function (fn) {
if (isDev) {
if (!isFunction(fn)) {
console.error("useUnmount expected parameter is a function, got ".concat(typeof fn));
}
}
var fnRef = useLatest(fn);
useEffect(function () { return function () {
fnRef.current();
}; }, []);
};
export default useUnmount;