MCPcopy Create free account
hub / github.com/ckeditor/ckeditor5-react / useIsUnmountedRef

Function useIsUnmountedRef

src/hooks/useIsUnmountedRef.ts:13–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 * @returns The mutable ref object.
12 */
13export const useIsUnmountedRef = (): MutableRefObject<boolean> => {
14 const mountedRef = useRef<boolean>( false );
15
16 useEffect( () => {
17 // Prevent issues in strict mode.
18 mountedRef.current = false;
19
20 return () => {
21 mountedRef.current = true;
22 };
23 }, [] );
24
25 return mountedRef;
26};

Callers 2

useAsyncCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…