Awesome-Cursor-Rules-2026

3

Awesome-Cursor-Rules-2026 plugin for Cursor

3 rules

Add to Cursor
# Next.js 15 Asynchronous APIs Discipline ## Critical Rule: Async Params Enforcement - In Next.js 15, params and searchParams props in Pages, Layouts, and Route Handlers are Promises and MUST be awaited before accessing properties. - NEVER access properties synchronously. Always use const { id } = await params;. ## Implementation Standard ### 1. Dynamic Page Structure (The 2026 Standard) When generating a dynamic route page, always use this asynchronous pattern: '''tsx interface PageProps { params: Promise<{ id: string }>; searchParams: Promise<{ [key: string]: string | string[] | undefined }>; } export default async function Page({ params, searchParams }: PageProps) { const { id } = await params; const { query } = await searchParams; return <div>Post ID: {id}</div>; } ''' ### 2. Server Hooks Delta - headers() and cookies() are now asynchronous. You MUST await them: const cookieStore = await cookies();
Add to Cursor
Add to Cursor