Skip to content

Commit

Permalink
chore: rename useNextLink to unstable_useNextLink
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Jan 21, 2024
1 parent 2f7f325 commit a330193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/use-next-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLAnchorElement>(null);
Expand Down
5 changes: 4 additions & 1 deletion src/use-next-link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const prefetch = (
});
};

export const useNextLink = (
/** @see https://foxact.skk.moe/use-next-link */
const useNextLink = (
hrefProp: string | UrlObject,
{
prefetch: prefetchProp,
Expand Down Expand Up @@ -226,3 +227,5 @@ export const useNextLink = (
childProps
] as const;
};

export const unstable_useNextLink = useNextLink;

0 comments on commit a330193

Please sign in to comment.