first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useUnmount = void 0;
var React = require("react");
/**
* Hook which synchronously executes a callback when the component is about to unmount.
*
* @param callback - Function to call during unmount.
*/
var useUnmount = function (callback) {
var unmountRef = React.useRef(callback);
unmountRef.current = callback;
React.useEffect(function () { return function () {
var _a;
(_a = unmountRef.current) === null || _a === void 0 ? void 0 : _a.call(unmountRef);
}; }, []);
};
exports.useUnmount = useUnmount;
//# sourceMappingURL=useUnmount.js.map