diff --git a/docs/src/pages/use-next-link.mdx b/docs/src/pages/use-next-link.mdx index da710dd8..7f040e39 100644 --- a/docs/src/pages/use-next-link.mdx +++ b/docs/src/pages/use-next-link.mdx @@ -20,7 +20,7 @@ The `useNextLink` hook is your last resort. You should always prefer `next/link` 'use client'; import { useRef } from 'react'; -import { useNextLink } from 'foxact/use-next-link'; +import { unstable_useNextLink as useNextLink } from 'foxact/use-next-link'; export default function Page() { const ref = useRef(null); diff --git a/src/use-next-link/index.ts b/src/use-next-link/index.ts index 20c291fe..81a3bbb5 100644 --- a/src/use-next-link/index.ts +++ b/src/use-next-link/index.ts @@ -71,7 +71,8 @@ const prefetch = ( }); }; -export const useNextLink = ( +/** @see https://foxact.skk.moe/use-next-link */ +const useNextLink = ( hrefProp: string | UrlObject, { prefetch: prefetchProp, @@ -226,3 +227,5 @@ export const useNextLink = ( childProps ] as const; }; + +export const unstable_useNextLink = useNextLink;