UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

15 lines (11 loc) 258 B
import { useEffect, useRef } from 'react'; export function useIsMountedRef() { const isMounted = useRef(false); useEffect(() => { isMounted.current = true; return () => { isMounted.current = false; }; }, []); return isMounted; }