React Best Practices

Optimize React and Next.js applications by eliminating waterfalls and reducing bundle size.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/mbeps/Skills --skill react-best-practices-mbeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: React Best Practices
Source: https://github.com/mbeps/Skills/tree/main/react-best-practices
Command: npx skills add https://github.com/mbeps/Skills --skill react-best-practices-mbeps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to optimizing React and Next.js applications, addressing performance bottlenecks from critical issues like waterfalls and bundle size to more incremental improvements.

Core Features & Use Cases

  • Performance Optimization: Offers 40+ rules across 8 categories to enhance application speed and efficiency.
  • AI-Assisted Development: Designed for AI agents and LLMs to maintain, generate, and refactor code consistently.
  • Use Case: An AI agent can use this Skill to automatically refactor a Next.js application, identifying and fixing performance anti-patterns such as unnecessary data fetching waterfalls or large, unoptimized component imports, leading to a faster user experience.

Quick Start

Use the react-best-practices skill to analyze the current codebase for performance bottlenecks and suggest optimizations.

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 application performance?

To optimize React and Next.js performance, apply a comprehensive guide of over 40 rules across 8 categories. This covers eliminating data fetching waterfalls, reducing bundle size, and improving re-render efficiency.

What is a data fetching waterfall in React and how do I fix it?

A data fetching waterfall occurs when sequential requests block application rendering. You fix it by applying targeted refactoring rules that parallelize server-side and client-side data fetching to enhance speed.

How do I reduce bundle size when importing large React components?

Reduce bundle size by identifying and fixing performance anti-patterns like large, unoptimized component imports. The skill provides specific rules for bundle size reduction to speed up your web application.

Can AI agents automatically refactor Next.js code for performance?

Yes, AI agents and LLMs can automatically refactor Next.js code. The skill is specifically designed to guide AI agents in maintaining, generating, and refactoring code to eliminate performance bottlenecks consistently.

Why does my React application re-render excessively and how can I prevent it?

Excessive React re-renders are caused by unoptimized component state and prop management. You can prevent them by applying the skill's dedicated re-render optimization and JavaScript performance rules.

Does this React optimization guide work for both server-side and client-side data fetching?

Yes, the guide works for both server-side and client-side data fetching. It provides specific rules to optimize data fetching patterns in Next.js applications, ensuring efficient rendering and improved load times.