MCPcopy Index your code
hub / github.com/adobe/react-spectrum / useDOMRef

Function useDOMRef

packages/@react-spectrum/ai/src/useDOMRef.ts:26–32  ·  view source on GitHub ↗
(
  ref: DOMRef<T>
)

Source from the content-addressed store, hash-verified

24}
25
26export function useDOMRef<T extends HTMLElement = HTMLElement>(
27 ref: DOMRef<T>
28): RefObject<T | null> {
29 let domRef = useRef<T>(null);
30 useImperativeHandle(ref, () => createDOMRef(domRef));
31 return domRef;
32}

Callers 8

ResponseStatus.tsxFile · 0.90
MessageSource.tsxFile · 0.90
AttachmentList.tsxFile · 0.90
Chat.tsxFile · 0.90
UserMessage.tsxFile · 0.90
HorizontalCard.tsxFile · 0.90

Calls 1

createDOMRefFunction · 0.70

Tested by

no test coverage detected