MCPcopy Create free account
hub / github.com/msgbyte/tailchat / useUpdateRef

Function useUpdateRef

client/shared/hooks/useUpdateRef.ts:3–8  ·  view source on GitHub ↗
(state: T)

Source from the content-addressed store, hash-verified

1import { useRef, MutableRefObject } from 'react';
2
3export function useUpdateRef<T>(state: T): MutableRefObject<T> {
4 const ref = useRef<T>(state);
5 ref.current = state;
6
7 return ref;
8}

Callers 8

useHandleSendMessageFunction · 0.90
useIntervalFunction · 0.90
useSharedEventHandlerFunction · 0.90
PanelRedirect.tsxFile · 0.85
useGlobalKeyDownFunction · 0.85
useLocationNavFunction · 0.85
useResizeObserverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected