react-best-practices

Review React and Next.js code for performance anti-patterns and optimization.

2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ucirello/sgai --skill react-best-practices-ucirello
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/ucirello/sgai/tree/main/cmd/sgai/skel/.sgai/skills/react-best-practices
Command: npx skills add https://github.com/ucirello/sgai --skill react-best-practices-ucirello

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses common performance bottlenecks in React and Next.js applications, ensuring faster load times, smoother user experiences, and more efficient code.

Core Features & Use Cases

  • Performance Auditing: Identifies and suggests fixes for critical performance anti-patterns.
  • Code Optimization: Provides specific, actionable rules for improving bundle size, server-side rendering, and client-side rendering.
  • Use Case: A developer is experiencing slow initial page loads in their Next.js app. They can use this Skill to identify and fix issues like large bundle sizes due to barrel imports or inefficient data fetching waterfalls.

Quick Start

Apply the react-best-practices skill to refactor the current codebase for optimal performance.

Frequently Asked Questions about react-best-practices

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

FAQPage Schema
How do I fix slow initial page loads in my Next.js app?

Fix slow initial page loads by identifying performance bottlenecks like large bundle sizes from barrel imports and inefficient data fetching waterfalls. Apply specific optimization rules to reduce bundle size and improve server-side rendering efficiency.

What is a data fetching waterfall and how does it affect React performance?

A data fetching waterfall occurs when sequential async requests block rendering, degrading React performance. Eliminate waterfalls by enforcing parallel data fetching patterns and optimizing server-side rendering to ensure faster load times.

How do I optimize bundle size when using barrel imports in React?

Optimize bundle size by replacing barrel imports with direct module imports to prevent bundling unused code. This code optimization technique reduces the final JavaScript payload and improves client-side rendering efficiency.

Does this React optimization approach work for both server-side and client-side rendering?

Yes, this React optimization approach works for both server-side and client-side rendering. It provides actionable rules to improve rendering efficiency across both environments, ensuring smoother user experiences and faster load times.

What's the best way to audit my React codebase for performance anti-patterns?

The best way to audit React performance anti-patterns is to review the codebase against Vercel Engineering standards. This identifies critical issues like inefficient data fetching and large bundles, providing specific refactoring suggestions.

When should I refactor my web application for performance tuning?

Refactor your web application for performance tuning when experiencing slow initial page loads or inefficient code execution. Targeting developers and AI agents, this process enforces best practices to resolve critical performance bottlenecks.