rsuite
Version:
A suite of react components
19 lines (14 loc) • 485 B
JavaScript
;
exports.__esModule = true;
exports.default = void 0;
var _react = require("react");
var useMount = function useMount(callback) {
var mountRef = (0, _react.useRef)(callback);
mountRef.current = callback;
(0, _react.useEffect)(function () {
var _mountRef$current;
(_mountRef$current = mountRef.current) === null || _mountRef$current === void 0 ? void 0 : _mountRef$current.call(mountRef);
}, []);
};
var _default = useMount;
exports.default = _default;