()
| 1 | import { useRef } from 'react'; |
| 2 | |
| 3 | export function useFirstMountState(): boolean { |
| 4 | const isFirst = useRef(true); |
| 5 | |
| 6 | if (isFirst.current) { |
| 7 | isFirst.current = false; |
| 8 | |
| 9 | return true; |
| 10 | } |
| 11 | |
| 12 | return isFirst.current; |
| 13 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…