( Comp: Constrain<TComp, any, (props: CreateLinkProps) => ReactNode>, )
| 899 | * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link |
| 900 | */ |
| 901 | export function createLink<const TComp>( |
| 902 | Comp: Constrain<TComp, any, (props: CreateLinkProps) => ReactNode>, |
| 903 | ): LinkComponent<TComp> { |
| 904 | return React.forwardRef(function CreatedLink(props, ref) { |
| 905 | return <Link {...(props as any)} _asChild={Comp} ref={ref} /> |
| 906 | }) as any |
| 907 | } |
| 908 | |
| 909 | /** |
| 910 | * A strongly-typed anchor component for declarative navigation. |
no outgoing calls
no test coverage detected