Loading...
Loading...
Provides expert guidance on Next.js App Router navigation, prefetching behavior, and Link component configuration. Use when working with Next.js navigation, Link prefetching, or App Router routing.
npx skill4agent add goncy/skills nextjs-navigationprefetch<Link>prefetch={false}prefetch={false}<Link href="/dashboard" prefetch={false}>
Dashboard
</Link>prefetch={undefined}prefetch={true}<Link href="/profile/[id]" prefetch={true}>
User Profile
</Link>key// app/search/page.tsx
export default function SearchPage({
searchParams
}: {
searchParams: { q?: string }
}) {
return (
<Suspense
key={searchParams.q}
fallback={<LoadingSpinner />}
>
<SearchResults query={searchParams.q} />
</Suspense>
)
}PagePropsimport type { PageProps } from 'next'
export default function Page({ params, searchParams }: PageProps) {
// params and searchParams are properly typed
}paramssearchParamscacheComponents<Activity>// next.config.js
module.exports = {
experimental: {
cacheComponents: true
}
}<Activity>