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

Function get

packages/react-aria-components/src/utils.tsx:512–524  ·  view source on GitHub ↗
(target, elementType)

Source from the content-addressed store, hash-verified

510 {},
511 {
512 get(target, elementType) {
513 if (typeof elementType !== 'string') {
514 return undefined;
515 }
516
517 let res = domComponentCache[elementType];
518 if (!res) {
519 res = forwardRef(DOMElement.bind(null, elementType));
520 domComponentCache[elementType] = res;
521 }
522
523 return res;
524 }
525 }
526) as DOMComponents;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected