nextjs-best-practices
Next.js App Router development patterns covering server/client components, data fetching, and routing.
- Server Components are the default; use Client Components only for interactivity (useState, event handlers, forms)
- Data fetching belongs in Server Components with three caching strategies: static (build-time), ISR (time-based revalidation), and dynamic (no-store)
- File conventions organize routes:
page.tsxfor UI,layout.tsxfor shared structure,loading.tsxanderror.tsxfor states, and route groups(name)to organize without affecting URLs - Server Actions handle form submissions and data mutations; validate inputs and mark with 'use server'
- Avoid common pitfalls: excessive 'use client' directives, client-side data fetching, missing loading/error boundaries, and large client bundles
Next.js Best Practices
Principles for Next.js App Router development.
1. Server vs Client Components
Decision Tree
Does it need...?
│
├── useState, useEffect, event handlers
│ └── Client Component ('use client')
│
├── Direct data fetching, no interactivity
│ └── Server Component (default)
│
More from sickn33/antigravity-awesome-skills
docker-expert
You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.
15.0Knodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
11.2Ktypescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.
8.3Kapi-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
7.0Kclean-code
This skill embodies the principles of \"Clean Code\" by Robert C. Martin (Uncle Bob). Use it to transform \"code that works\" into \"code that is clean.\"
6.5Knextjs-supabase-auth
Expert integration of Supabase Auth with Next.js App Router
4.8K