react-best-practices

Apply community-driven performance patterns to React and Next.js apps.

Updated Dec 30, 2025
One-click install
npx skills add https://github.com/josh-cooper/.claude --skill react-best-practices-josh-cooper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/josh-cooper/.claude/tree/main/skills/react-best-practices
Command: npx skills add https://github.com/josh-cooper/.claude --skill react-best-practices-josh-cooper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React and Next.js performance patterns can be hard to recall and apply consistently across teams. This skill collects community-driven best practices to prevent waterfalls, reduce bundle size, and optimize server vs client data fetching through architecture and concrete examples.

Core Features & Use Cases

  • Comprehensive performance patterns across 8+ categories, prioritized by impact to guide automated refactoring and code generation.
  • Clear guidance on server-first data fetching, routing decisions, and client-side patterns.
  • Real-world examples and anti-patterns to guide refactoring and code generation.

Quick Start

Analyze a React/Next.js project and apply the documented performance patterns to optimize rendering, data fetching, and bundling.

Frequently Asked Questions about react-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize React and Next.js performance by reducing render waterfalls?

Optimize React and Next.js performance by applying server-first data fetching patterns. This approach prioritizes server-side rendering and data retrieval to minimize sequential client requests, reducing waterfalls and improving Time To Interactive.

When should I use server components versus client fetches for data fetching?

Use server components for data fetching by default to reduce bundle size and secure data access. Shift to client fetches or TanStack Query only when interactive client-side state management is explicitly required.

What is the best way to refactor a Next.js app to improve Time To Interactive?

The best way to refactor for Time To Interactive is applying prioritized performance patterns across data fetching, routing, and bundling. Enforce safe refactor guidelines and robust error handling to systematically reduce bundle sizes and eliminate render waterfalls.

How do I manage client state in Next.js without increasing bundle size?

Manage client state without increasing bundle size by isolating interactive logic and using TanStack Query for client fetches. Keep static data processing in server components and route handlers to prevent unnecessary JavaScript from shipping to the client.

Does this Next.js performance pattern work with route handlers and URL params?

Yes, the performance patterns explicitly cover using route handlers and URL params. The guidance spans the full spectrum from server-first rendering and URL parameters to client fetches, ensuring robust data fetching architecture across your Next.js application.