()
| 107 | } |
| 108 | |
| 109 | export function useIsMounted() { |
| 110 | const ref = useRef(true); |
| 111 | useEffect(() => { |
| 112 | return () => { |
| 113 | ref.current = false; |
| 114 | }; |
| 115 | }, []); |
| 116 | return useCallback(() => ref.current, []); |
| 117 | } |
| 118 | |
| 119 | export function useStopwatch() { |
| 120 | const prevTime = useRef(new Date()); |
no outgoing calls
no test coverage detected