React best practices

From sickn33/agentic-awesome-skills · View interactive version

React best practices is an AI agent skill from the GitHub repository sickn33/agentic-awesome-skills. Comprehensive performance optimization guide for React and Next.js applications, adapted from Vercel’s published guidance. Use when writing new React components or Next.js pages, implementing data fetching (client or server-side), or reviewing code for performance issues.

How to use this skill

Skill file

React Best Practices (catalog adaptation)

Comprehensive performance optimization guide for React and Next.js applications, adapted from Vercel’s published guidance. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Use

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Eliminating Waterfalls | CRITICAL | async- |

| 2 | Bundle Size Optimization | CRITICAL | bundle- |

| 3 | Server-Side Performance | HIGH | server- |

| 4 | Client-Side Data Fetching | MEDIUM-HIGH | client- |

| 5 | Re-render Optimization | MEDIUM | rerender- |

| 6 | Rendering Performance | MEDIUM | rendering- |

| 7 | JavaScript Performance | LOW-MEDIUM | js- |

| 8 | Advanced Patterns | LOW | advanced- |

Quick Reference

1. Eliminating Waterfalls (CRITICAL)

2. Bundle Size Optimization (CRITICAL)

3. Server-Side Performance (HIGH)

4. Client-Side Data Fetching (MEDIUM-HIGH)

5. Re-render Optimization (MEDIUM)

6. Rendering Performance (MEDIUM)

7. JavaScript Performance (LOW-MEDIUM)

8. Advanced Patterns (LOW)

How to Use

Read individual rule files for detailed explanations and code examples:

rules/async-parallel.md
rules/bundle-barrel-imports.md
rules/_sections.md

Each rule file contains:

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Limitations

Examples are sketches, not complete applications. Identify installed React/Next/SWR versions, public package exports and Server/Client module boundaries before editing. Profile a concrete bottleneck and preserve authorization, privacy, accessibility and behavior; impact levels and historical timing numbers are priorities, not guaranteed measurements. Validate one change with the application’s checks before broad refactoring. No deployments or analytics transmission are authorized by this guide.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.