260322:1648 Correct Coresspondence / Doing RFA / Correct CI
This commit is contained in:
@@ -11,6 +11,7 @@ Apply these rules when writing or reviewing Next.js code.
|
||||
## File Conventions
|
||||
|
||||
See [file-conventions.md](./file-conventions.md) for:
|
||||
|
||||
- Project structure and special files
|
||||
- Route segments (dynamic, catch-all, groups)
|
||||
- Parallel and intercepting routes
|
||||
@@ -21,6 +22,7 @@ See [file-conventions.md](./file-conventions.md) for:
|
||||
Detect invalid React Server Component patterns.
|
||||
|
||||
See [rsc-boundaries.md](./rsc-boundaries.md) for:
|
||||
|
||||
- Async client component detection (invalid)
|
||||
- Non-serializable props detection
|
||||
- Server Action exceptions
|
||||
@@ -30,6 +32,7 @@ See [rsc-boundaries.md](./rsc-boundaries.md) for:
|
||||
Next.js 15+ async API changes.
|
||||
|
||||
See [async-patterns.md](./async-patterns.md) for:
|
||||
|
||||
- Async `params` and `searchParams`
|
||||
- Async `cookies()` and `headers()`
|
||||
- Migration codemod
|
||||
@@ -37,18 +40,21 @@ See [async-patterns.md](./async-patterns.md) for:
|
||||
## Runtime Selection
|
||||
|
||||
See [runtime-selection.md](./runtime-selection.md) for:
|
||||
|
||||
- Default to Node.js runtime
|
||||
- When Edge runtime is appropriate
|
||||
|
||||
## Directives
|
||||
|
||||
See [directives.md](./directives.md) for:
|
||||
|
||||
- `'use client'`, `'use server'` (React)
|
||||
- `'use cache'` (Next.js)
|
||||
|
||||
## Functions
|
||||
|
||||
See [functions.md](./functions.md) for:
|
||||
|
||||
- Navigation hooks: `useRouter`, `usePathname`, `useSearchParams`, `useParams`
|
||||
- Server functions: `cookies`, `headers`, `draftMode`, `after`
|
||||
- Generate functions: `generateStaticParams`, `generateMetadata`
|
||||
@@ -56,6 +62,7 @@ See [functions.md](./functions.md) for:
|
||||
## Error Handling
|
||||
|
||||
See [error-handling.md](./error-handling.md) for:
|
||||
|
||||
- `error.tsx`, `global-error.tsx`, `not-found.tsx`
|
||||
- `redirect`, `permanentRedirect`, `notFound`
|
||||
- `forbidden`, `unauthorized` (auth errors)
|
||||
@@ -64,6 +71,7 @@ See [error-handling.md](./error-handling.md) for:
|
||||
## Data Patterns
|
||||
|
||||
See [data-patterns.md](./data-patterns.md) for:
|
||||
|
||||
- Server Components vs Server Actions vs Route Handlers
|
||||
- Avoiding data waterfalls (`Promise.all`, Suspense, preload)
|
||||
- Client component data fetching
|
||||
@@ -71,6 +79,7 @@ See [data-patterns.md](./data-patterns.md) for:
|
||||
## Route Handlers
|
||||
|
||||
See [route-handlers.md](./route-handlers.md) for:
|
||||
|
||||
- `route.ts` basics
|
||||
- GET handler conflicts with `page.tsx`
|
||||
- Environment behavior (no React DOM)
|
||||
@@ -79,6 +88,7 @@ See [route-handlers.md](./route-handlers.md) for:
|
||||
## Metadata & OG Images
|
||||
|
||||
See [metadata.md](./metadata.md) for:
|
||||
|
||||
- Static and dynamic metadata
|
||||
- `generateMetadata` function
|
||||
- OG image generation with `next/og`
|
||||
@@ -87,6 +97,7 @@ See [metadata.md](./metadata.md) for:
|
||||
## Image Optimization
|
||||
|
||||
See [image.md](./image.md) for:
|
||||
|
||||
- Always use `next/image` over `<img>`
|
||||
- Remote images configuration
|
||||
- Responsive `sizes` attribute
|
||||
@@ -96,6 +107,7 @@ See [image.md](./image.md) for:
|
||||
## Font Optimization
|
||||
|
||||
See [font.md](./font.md) for:
|
||||
|
||||
- `next/font` setup
|
||||
- Google Fonts, local fonts
|
||||
- Tailwind CSS integration
|
||||
@@ -104,6 +116,7 @@ See [font.md](./font.md) for:
|
||||
## Bundling
|
||||
|
||||
See [bundling.md](./bundling.md) for:
|
||||
|
||||
- Server-incompatible packages
|
||||
- CSS imports (not link tags)
|
||||
- Polyfills (already included)
|
||||
@@ -113,6 +126,7 @@ See [bundling.md](./bundling.md) for:
|
||||
## Scripts
|
||||
|
||||
See [scripts.md](./scripts.md) for:
|
||||
|
||||
- `next/script` vs native script tags
|
||||
- Inline scripts need `id`
|
||||
- Loading strategies
|
||||
@@ -121,6 +135,7 @@ See [scripts.md](./scripts.md) for:
|
||||
## Hydration Errors
|
||||
|
||||
See [hydration-error.md](./hydration-error.md) for:
|
||||
|
||||
- Common causes (browser APIs, dates, invalid HTML)
|
||||
- Debugging with error overlay
|
||||
- Fixes for each cause
|
||||
@@ -128,12 +143,14 @@ See [hydration-error.md](./hydration-error.md) for:
|
||||
## Suspense Boundaries
|
||||
|
||||
See [suspense-boundaries.md](./suspense-boundaries.md) for:
|
||||
|
||||
- CSR bailout with `useSearchParams` and `usePathname`
|
||||
- Which hooks require Suspense boundaries
|
||||
|
||||
## Parallel & Intercepting Routes
|
||||
|
||||
See [parallel-routes.md](./parallel-routes.md) for:
|
||||
|
||||
- Modal patterns with `@slot` and `(.)` interceptors
|
||||
- `default.tsx` for fallbacks
|
||||
- Closing modals correctly with `router.back()`
|
||||
@@ -141,6 +158,7 @@ See [parallel-routes.md](./parallel-routes.md) for:
|
||||
## Self-Hosting
|
||||
|
||||
See [self-hosting.md](./self-hosting.md) for:
|
||||
|
||||
- `output: 'standalone'` for Docker
|
||||
- Cache handlers for multi-instance ISR
|
||||
- What works vs needs extra setup
|
||||
@@ -148,6 +166,6 @@ See [self-hosting.md](./self-hosting.md) for:
|
||||
## Debug Tricks
|
||||
|
||||
See [debug-tricks.md](./debug-tricks.md) for:
|
||||
|
||||
- MCP endpoint for AI-assisted debugging
|
||||
- Rebuild specific routes with `--debug-build-paths`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user