source: imaps-frontend/node_modules/react-use/lib/useFirstMountState.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 384 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.useFirstMountState = void 0;
4var react_1 = require("react");
5function useFirstMountState() {
6 var isFirst = react_1.useRef(true);
7 if (isFirst.current) {
8 isFirst.current = false;
9 return true;
10 }
11 return isFirst.current;
12}
13exports.useFirstMountState = useFirstMountState;
Note: See TracBrowser for help on using the repository browser.