vercel-react-best-practices

Applies Vercel performance optimization rules when writing or refactoring React and Next.js code.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/scoots31/engineering-playbook --skill vercel-react-best-practices-scoots31
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/scoots31/engineering-playbook/tree/main/references/react-best-practices
Command: npx skills add https://github.com/scoots31/engineering-playbook --skill vercel-react-best-practices-scoots31

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often ship with hidden performance problems—async waterfalls, bloated bundles, unnecessary re-renders—that are hard to spot during everyday development and code review. ## Core Features & Use Cases - 70 Prioritized Rules: Covers 8 categories ranked by impact, from eliminating waterfalls and reducing bundle size (CRITICAL) to re-render optimization and advanced hook patterns. - Incorrect vs. Correct Examples: Every rule includes side-by-side code comparisons with explanations, making it directly actionable for code generation and refactoring. - Use Case: While building a Next.js page that fetches user data, config, and posts sequentially, apply the waterfall rules to parallelize the fetches with Promise.all and wrap slow sections in Suspense boundaries for faster initial paint. ## Quick Start Review my React component and Next.js data fetching code for performance issues using the Vercel best practices rules.

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 async waterfalls in Next.js API routes?

Start independent operations immediately by creating promises before awaiting them, then use Promise.all to await them together. For partial dependencies, chain promises or use the better-all library so each task starts at the earliest possible moment.

How to reduce bundle size from barrel file imports in React?

Import directly from source files instead of barrel entry points, or use Next.js 13.5+ optimizePackageImports config which transforms imports automatically. Barrel files in libraries like lucide-react or MUI can load thousands of unused modules, adding 200-800ms to cold starts.

Does this guide cover React Server Components performance?

Yes, it includes server-side rules for RSC serialization minimization, per-request deduplication with React.cache, avoiding shared module state, and parallel data fetching with component composition. It also covers authenticating Server Actions like public API routes.

When should I use Suspense boundaries in Next.js pages?

Use Suspense when only part of the page needs async data, so the layout renders immediately while data streams in. Avoid it for SEO-critical above-the-fold content, layout-determining data, or very fast queries where the overhead is not worthwhile.

Why does my React component re-render too often?

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