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.useMount = void 0;
var React = require("react");
/**
* Hook which asynchronously executes a callback once the component has been mounted.
*
* @param callback - Function to call before mount.
*/
var useMount = function (callback) {
var mountRef = React.useRef(callback);
mountRef.current = callback;
React.useEffect(function () {
var _a;
(_a = mountRef.current) === null || _a === void 0 ? void 0 : _a.call(mountRef);
}, []);
};
exports.useMount = useMount;
//# sourceMappingURL=useMount.js.map