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

Function useDOMRef

packages/@react-spectrum/s2/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 15

ProgressCircle.tsxFile · 0.90
Disclosure.tsxFile · 0.90
Popover.tsxFile · 0.90
Modal.tsxFile · 0.90
Tooltip.tsxFile · 0.90
Tabs.tsxFile · 0.90
ColorArea.tsxFile · 0.90
CustomDialog.tsxFile · 0.90
Avatar.tsxFile · 0.90
InlineAlert.tsxFile · 0.90
DropZone.tsxFile · 0.90

Calls 1

createDOMRefFunction · 0.70

Tested by

no test coverage detected