MCPcopy Create free account
hub / github.com/adobe/react-spectrum / useDOMRef

Function useDOMRef

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

Source from the content-addressed store, hash-verified

39}
40
41export function useDOMRef<T extends HTMLElement = HTMLElement>(
42 ref: DOMRef<T>
43): RefObject<T | null> {
44 let domRef = useRef<T>(null);
45 useImperativeHandle(ref, () => createDOMRef(domRef));
46 return domRef;
47}
48
49export function useFocusableRef<T extends HTMLElement = HTMLElement, D extends HTMLElement = T>(
50 ref: FocusableRef<T, D>,

Callers 9

Alert.tsxFile · 0.90
ResponseStatus.tsxFile · 0.90
MessageSource.tsxFile · 0.90
AttachmentList.tsxFile · 0.90
Chat.tsxFile · 0.90
UserMessage.tsxFile · 0.90
AttachmentGrid.tsxFile · 0.90

Calls 1

createDOMRefFunction · 0.70

Tested by

no test coverage detected