+ {isPending &&
Navigating...
}
+ {/** You can only pass non-"next/link" prop directly to the
*/}
+ {/** All "next/link" prop and "ref" should be passed to useNextLink() */}
+
+ About
+
+
+ );
+}
+```
diff --git a/src/use-next-link/index.ts b/src/use-next-link/index.ts
new file mode 100644
index 00000000..81a3bbb5
--- /dev/null
+++ b/src/use-next-link/index.ts
@@ -0,0 +1,231 @@
+import 'client-only';
+
+import type { UrlObject } from 'url';
+import type { LinkProps } from 'next/link';
+import { useCallback, useEffect, useMemo, useState, useTransition } from 'react';
+import { useRouter } from 'next/navigation';
+
+import { formatUrl } from 'next/dist/shared/lib/router/utils/format-url';
+import { useIntersection } from '../use-intersection';
+
+import type {
+ PrefetchOptions as AppRouterPrefetchOptions
+} from 'next/dist/shared/lib/app-router-context.shared-runtime';
+import type { PrefetchKind } from 'next/dist/client/components/router-reducer/router-reducer-types';
+
+export interface UseNextLinkOptions extends Omit