vercel-react-best-practices

Applies 70 prioritized React and Next.js performance optimization rules during code writing and review.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/taylorelley/skills --skill vercel-react-best-practices-taylorelley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/taylorelley/skills/tree/main/skills/framework/vercel-react-best-practices
Command: npx skills add https://github.com/taylorelley/skills --skill vercel-react-best-practices-taylorelley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often ship with performance problems like sequential data-fetching waterfalls, bloated bundles from barrel imports, and unnecessary re-renders. This Skill gives an AI agent a structured, impact-prioritized rule set from Vercel Engineering so it can write, review, and refactor code that avoids these issues from the start. ## Core Features & Use Cases - 70 rules across 8 categories: Covers eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript performance, and advanced patterns, each with incorrect vs. correct code examples. - Impact-prioritized guidance: Rules are ranked from CRITICAL (e.g., Promise.all parallelization, avoiding barrel imports) to LOW (advanced hook patterns), so the highest-value fixes are applied first. - Individual rule files plus compiled guide: Each rule lives in its own Markdown file under rules/ for targeted lookup, with AGENTS.md providing the full compiled document. - Use Case: While refactoring a Next.js page that fetches user, posts, and comments sequentially, the agent applies the async-parallel rule to combine them into a single Promise.all, cutting three round trips to one. ## Quick Start Ask the agent to review your React component or Next.js page for performance issues using the Vercel best practices rules and suggest concrete fixes.

Frequently Asked Questions about vercel-react-best-practices

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

FAQPage Schema
How do I fix data fetching waterfalls in Next.js?

Start independent async operations immediately and await them together with Promise.all instead of awaiting sequentially. For partial dependencies, use better-all or chain promises so each task starts at the earliest possible moment, yielding 2-10x improvements.

How to reduce React bundle size from barrel file imports?

Avoid importing from barrel files that re-export thousands of modules. In Next.js 13.5+, enable optimizePackageImports in next.config.js; otherwise import directly from subpaths like @mui/material/Button to load only what you use.

Does this skill work with React Server Components?

Yes, it includes dedicated server-side rules for RSC and Next.js, covering React.cache per-request deduplication, minimizing serialization at RSC boundaries, avoiding shared module state, and authenticating Server Actions like public API routes.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data drives layout decisions, when content is SEO-critical above the fold, when queries are small and fast, or when you want to prevent layout shift. The trade-off is faster initial paint versus potential content jumping.

Why does my React component re-render too often?

Common causes include defining components inside components, missing memoization of expensive subtrees, broad effect dependencies, and subscribing to raw state instead of derived values. The re-render rules cover functional setState, useDeferredValue, transitions, and lazy state initialization.