MCPcopy Create free account
hub / github.com/TanStack/query / Link

Function Link

examples/solid/astro/src/components/Link.tsx:1–20  ·  view source on GitHub ↗
(props: {
  href: string
  children: any
  class?: string
})

Source from the content-addressed store, hash-verified

1export const Link = (props: {
2 href: string
3 children: any
4 class?: string
5}) => {
6 // Links doing client-side navigation
7 return (
8 <a
9 href={props.href}
10 onClick={(e) => {
11 e.preventDefault()
12 history.pushState({}, '', props.href)
13 window.dispatchEvent(new PopStateEvent('popstate'))
14 }}
15 class={props.class}
16 >
17 {props.children}
18 </a>
19 )
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected