react-best-practices

Apply React and Next.js best practices to optimize component performance and data fetching.

218|33|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/first-fluke/fullstack-starter --skill react-best-practices-first-fluke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/first-fluke/fullstack-starter/tree/main/.agents/skills/react-best-practices
Command: npx skills add https://github.com/first-fluke/fullstack-starter --skill react-best-practices-first-fluke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates performance optimization patterns for React and Next.js, helping teams write faster, more maintainable UI by applying proven guidelines rather than ad-hoc fixes.

Core Features & Use Cases

  • Performance-focused guidance across 8 priority categories, including waterfalls, bundle size, server and client data fetching, re-render optimization, rendering, JavaScript tips, and advanced patterns.
  • Tooling-aware practices: reliance on the React Compiler, Orval-generated React Query hooks, and the recommended data-fetching approach for Client Components.
  • Real-world applicability: used when writing new components, reviewing PRs, or refactoring existing codebases to meet performance targets.

Quick Start

  • Review the React Best Practices AGENTS.md and align new code with the 42 rules in the guideline.
  • Ensure React Compiler is enabled in next.config.ts and switch to Orval hooks for data fetching in Client Components.
  • Integrate with your CI to flag performance regressions against the guideline.

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 for data fetching and bundle size?

Optimize React and Next.js performance by applying established best practices across eight priority categories, including server and client data fetching, bundle size reduction, and waterfall prevention. Using Orval-generated React Query hooks and React Compiler memoization enforces these performance targets.

What is the best way to prevent unnecessary re-renders in Next.js client components?

Prevent unnecessary re-renders in Next.js client components by leveraging React Compiler memoization and switching to Orval-generated React Query hooks for data fetching. These tooling-aware practices enforce optimized rendering patterns automatically.

How do I refactor an existing React codebase to meet performance targets?

Refactor an existing React codebase to meet performance targets by aligning components with a 42-rule guideline covering waterfalls, bundle optimization, and rendering. Ensure React Compiler is enabled in next.config.ts and integrate checks into CI to flag regressions.

Does the React Compiler work with Next.js to handle memoization automatically?

The React Compiler works with Next.js to handle memoization automatically, provided it is enabled in next.config.ts. This tooling-aware practice eliminates manual memoization and enforces optimized re-render patterns across client and server contexts.

When should I use Orval-generated React Query hooks in my React application?

Use Orval-generated React Query hooks in your React application when fetching data within Client Components to ensure optimal performance. This approach is part of a proven guideline that replaces ad-hoc fixes with structured, tooling-aware patterns.

Why should I use established best practices instead of ad-hoc fixes for React performance?

Use established best practices instead of ad-hoc fixes for React performance to write faster, more maintainable UI. Consolidated optimization patterns provide consistent guidance across waterfalls, bundle size, and rendering, ensuring codebases meet performance targets reliably.