8 lines
460 B
Plaintext
8 lines
460 B
Plaintext
---
|
|
description: Rules for performance optimization in Next.js applications, including minimizing client-side logic, using Suspense, and optimizing images.
|
|
globs: **/*.{ts,tsx,js,jsx}
|
|
---
|
|
- Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
|
|
- Wrap client components in Suspense with fallback.
|
|
- Use dynamic loading for non-critical components.
|
|
- Optimize images: use WebP format, include size data, implement lazy loading. |