source: imaps-frontend/node_modules/react-use/esm/useFirstMountState.js

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

Update repo after prototype presentation

  • Property mode set to 100644
File size: 220 bytes
Line 
1import { useRef } from 'react';
2export function useFirstMountState() {
3 var isFirst = useRef(true);
4 if (isFirst.current) {
5 isFirst.current = false;
6 return true;
7 }
8 return isFirst.current;
9}
Note: See TracBrowser for help on using the repository browser.