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

Function BaseLink

packages/dev/s2-docs/src/Link.tsx:24–26  ·  view source on GitHub ↗
({ref, ...props}: RACLinkProps & {ref?: Ref<HTMLAnchorElement>})

Source from the content-addressed store, hash-verified

22import {registerLink, registerSpectrumLink} from './prefetch';
23
24export function BaseLink({ref, ...props}: RACLinkProps & {ref?: Ref<HTMLAnchorElement>}) {
25 return <RACLink {...props} ref={useMemo(() => mergeRefs(ref, registerLink), [ref])} />;
26}
27
28export function Link({href, ...props}: LinkProps) {
29 if (href?.startsWith('s2:') || href?.startsWith('react-aria:')) {

Callers

nothing calls this directly

Calls 1

mergeRefsFunction · 0.90

Tested by

no test coverage detected