mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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]>
9 lines
203 B
TypeScript
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} />
|
|
}
|