What problem does it solve?
This Skill provides best practices and guidelines for developing and maintaining Next.js applications, optimizing performance, and ensuring code quality.
Core Features & Use Cases
- File Conventions: Outlines file and directory structures for Next.js projects, including best practices for organization and naming.
- RSC Boundaries: Explains the limitations and best practices for Server Components to avoid common pitfalls.
- Data Patterns: Details the recommended patterns for data fetching and handling in Next.js.
- Error Handling: Covers techniques for error handling, including error boundaries and custom error pages.
- Image Optimization: Provides guidelines for optimizing images in Next.js applications.
- Font Optimization: Offers best practices for using fonts in Next.js with zero layout shift.
- Bundling: Discusses common bundling issues with third-party packages and solutions.
- Scripts: Details the use of
next/script for loading third-party scripts with performance considerations.
- Self-Hosting: Explains how to self-host Next.js applications for deployment on any platform.
- Hydration Errors: Offers solutions for common React hydration mismatch errors.
- Parallel & Intercepting Routes: Describes the implementation of modal patterns with parallel and intercepting routes.
- Route Handlers: Covers creating API endpoints with
route.ts files and managing different HTTP methods.
Quick Start
Use the next-best-practices skill to review the file conventions for a Next.js project.