Outlook_Addin_LLM/node_modules/@fluentui/react-utilities/lib-commonjs/hooks/useFirstMount.js

21 lines
563 B
JavaScript
Raw Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useFirstMount", {
enumerable: true,
get: function() {
return useFirstMount;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
function useFirstMount() {
const isFirst = _react.useRef(true);
if (isFirst.current) {
isFirst.current = false;
return true;
}
return isFirst.current;
}