vercel-react-best-practices

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

4|Updated May 13, 2026
One-click install
npx skills add https://github.com/RuixeWolf/modbus-simulator --skill vercel-react-best-practices-ruixewolf
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/RuixeWolf/modbus-simulator/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/RuixeWolf/modbus-simulator --skill vercel-react-best-practices-ruixewolf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from slow load times, unnecessary re-renders, and bloated bundles because developers miss subtle performance pitfalls. This Skill provides a structured, prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven optimization patterns during code generation and review. ## Core Features & Use Cases - 70 Prioritized Rules Across 8 Categories: Covers eliminating async waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript micro-optimizations, and advanced patterns. - Incorrect vs. Correct Code Examples: Each rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, with impact metrics like 2-10x improvements. - Use Case: When refactoring a Next.js dashboard that loads slowly, apply the waterfall elimination rules to parallelize data fetching with Promise.all(), use Suspense boundaries for streaming, and replace barrel file imports to cut cold start time by 200-800ms. ## Quick Start Review my Next.js page component and apply the Vercel React best practices rules to eliminate data fetching waterfalls and reduce bundle size.

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 eliminate data fetching waterfalls in Next.js?▼

Start independent async operations immediately and await them together with Promise.all() instead of sequential awaits. 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 bundle size from barrel file imports?▼

Import directly from source files instead of barrel entry points, or use Next.js 13.5+ optimizePackageImports config to transform imports automatically. Barrel files in libraries like lucide-react or @mui/material can add 200-800ms import cost on cold starts.

When should I use Suspense boundaries in React?▼

Use Suspense when only part of a page needs async data, so the wrapper UI renders immediately while data streams in. Avoid it for SEO-critical above-fold content or when layout shift from loading states would hurt user experience.

Does this guide work with React Server Components?▼

Yes, it includes RSC-specific rules like avoiding duplicate serialization in props, using React.cache() for per-request deduplication, and avoiding shared module state for request data to prevent cross-request contamination in concurrent renders.

Why do my React effects re-run on every render?▼

Common causes include including useEffectEvent functions in dependency arrays or unstable callback references. Store handlers in refs or use useEffectEvent to create stable subscriptions that always call the latest handler version.