source:
imaps-frontend/node_modules/react-use/esm/useFirstMountState.js
Last change on this file was d565449, checked in by , 4 weeks ago | |
---|---|
|
|
File size: 220 bytes |
Line | |
---|---|
1 | import { useRef } from 'react'; |
2 | export 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.