MCPcopy Create free account
hub / github.com/dawsbot/drain / useIsMounted

Function useIsMounted

hooks/useIsMounted.ts:3–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import * as React from 'react';
2
3const subscribe = () => () => {};
4
5export const useIsMounted = () => {
6 return React.useSyncExternalStore(
7 subscribe,
8 () => true,
9 () => false,
10 );
11};

Callers 1

AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected