@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
12 lines • 352 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = useMemoOnce;
const react_1 = require("react");
function useMemoOnce(callback) {
const ref = (0, react_1.useRef)(undefined);
if (!ref.current) {
ref.current = callback();
}
return ref.current;
}
//# sourceMappingURL=useMemoOnce.js.map