Files
next.js/test/e2e/legacy-link-behavior/app/validations/rsc-that-renders-client/client-link.tsx
35f60806d7 Re-enable legacyBehavior and passHref on Link (#84500)
In https://github.com/vercel/next.js/pull/83003, `legacyBehavior` and
`passHref` were removed from `<Link>`. However, this turned out to be a
bit premature—despite most usage being covered by the newer `<Link>`
APIs, there's some use cases we don't yet have good alternatives for.

We expect to solve this with an API that uses Fragment Refs once they're
available in React. For now, we're re-enabling these flags.

---------

Co-authored-by: JJ Kasper <[email protected]>
2025-10-08 16:37:36 -07:00

9 lines
203 B
TypeScript

'use client'
import Link from 'next/link'
import { ComponentProps } from 'react'
export function ClientLink(props: ComponentProps<typeof Link>) {
return <Link legacyBehavior passHref {...props} />
}