What problem does it solve?
This Skill provides a comprehensive guide to best practices for Next.js development, helping you write more efficient, maintainable, and robust code.
Core Features & Use Cases
- File Conventions: Follow Next.js's recommended file structure and naming conventions for project organization.
- RSC Boundaries: Detect and prevent invalid React Server Component patterns.
- Async Patterns: Learn to use Next.js 15+ async APIs effectively.
- Runtime Selection: Choose the appropriate Node.js or Edge runtime for your project.
- Directives: Understand and apply React and Next.js directives for server and client components.
- Error Handling: Implement error boundaries and navigate the nuances of error handling in Next.js.
- Data Patterns: Choose the right data fetching pattern for each use case, from Server Components to Route Handlers.
- Route Handlers: Create API endpoints with
route.ts files.
- RSC Boundaries: Ensure your code adheres to Next.js's component boundaries.
- Self-Hosting: Deploy Next.js outside of Vercel and optimize for production.
- Hydration Errors: Diagnose and fix React hydration mismatch errors.
- Parallel & Intercepting Routes: Implement modal patterns and parallel routes.
- Debug Tricks: Speed up debugging Next.js applications with tips and tools.
- Image Optimization: Optimize images for Next.js with the
next/image component.
- Font Optimization: Use
next/font for automatic font optimization.
- Bundling: Handle bundling issues with third-party packages and configure Next.js for better performance.
- SEO: Enhance your website's SEO with metadata and image optimizations.
- Quick Reference: Provide a quick reference for various Next.js features and best practices.
- Use Case: Use this Skill to enhance your Next.js web application by applying best practices throughout development.
Quick Start
Run the next-best-practices skill to access the guide on Next.js best practices.