react-best-practices

Optimizes React and Next.js code by identifying performance anti-patterns, rendering inefficiencies, and bundle-size regressions.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/vh2224/forge-executor --skill react-best-practices-vh2224
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/vh2224/forge-executor/tree/main/src/resources/skills/react-best-practices
Command: npx skills add https://github.com/vh2224/forge-executor --skill react-best-practices-vh2224

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams write, review, and refactor React and Next.js code with performance-oriented best practices so applications render faster, fetch data more efficiently, and avoid common re-render and bundle-size pitfalls.

Core Features & Use Cases

  • Render and data-fetch optimization: Reduce waterfalls, parallelize async work, and place Suspense boundaries strategically.
  • Bundle and loading optimization: Prefer direct imports, dynamic imports, conditional loading, and deferred third-party scripts to improve startup speed.
  • React correctness and responsiveness: Apply memoization, functional state updates, lazy initialization, and stable refs to prevent stale closures and unnecessary renders.
  • Use case: A developer can use this Skill to review a Next.js page, identify sequential fetches and heavy imports, and refactor the component tree for better performance without changing user-facing behavior.

Quick Start

Ask for a review of your React or Next.js component and request specific performance improvements, then apply the recommended refactors directly in the codebase.

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 component rendering and reduce unnecessary re-renders?

To optimize React rendering, apply memoization, functional state updates, lazy initialization, and stable refs to prevent stale closures and unnecessary renders. You can refactor component trees to improve UI responsiveness without changing user-facing behavior.

What is the best way to fix sequential data fetching waterfalls in Next.js?

Fix data fetching waterfalls by reducing sequential fetches, parallelizing async work, and placing Suspense boundaries strategically. This approach ensures applications render faster and fetch data more efficiently.

How do I reduce React bundle size regressions and improve startup speed?

Reduce React bundle size by preferring direct imports, using dynamic imports for conditional loading, and deferring third-party scripts. These loading optimizations directly improve application startup speed.

Does this React performance review approach work with Next.js server actions and hydration behavior?

Yes, this approach applies to Next.js server actions and hydration behavior. It enforces React-specific best practices for concurrency, caching, and safe effect and state management in production apps.

When should I not use memoization for React performance refactoring?

Memoization should be avoided when it adds unnecessary overhead without preventing actual re-renders. The focus should be on identifying true performance anti-patterns and rendering inefficiencies rather than applying optimization blindly.