vercel-react-best-practices

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

Updated May 14, 2026
One-click install
npx skills add https://github.com/jesusprodriguezUnir/bracketMundial --skill vercel-react-best-practices-jesusprodriguezunir
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/jesusprodriguezUnir/bracketMundial/tree/main/.agents/skills/react-best-practices
Command: npx skills add https://github.com/jesusprodriguezUnir/bracketMundial --skill vercel-react-best-practices-jesusprodriguezunir

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 data-fetching waterfalls that are hard to spot during development. This Skill gives AI agents and developers a prioritized, rule-based checklist to catch and fix these performance issues 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, each ranked by impact from CRITICAL to LOW. - Incorrect vs. Correct Code Examples: Every rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, plus impact metrics like 2-10x improvements or 200-800ms import cost reductions. - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, apply the async-parallel rule to convert the sequential awaits into a single Promise.all(), cutting three network round trips down to one. ## Quick Start Ask the AI to review your React component or Next.js page against the Vercel performance rules and refactor any waterfalls, barrel imports, or unnecessary re-renders it finds.

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 awaiting sequentially. For partial dependencies, start promises early and chain dependent fetches, or use the better-all library to maximize parallelism automatically.

How to reduce bundle size from barrel file imports?▼

Import directly from source files instead of barrel entry points, which can load thousands of unused modules costing 200-800ms. In Next.js 13.5+, use the optimizePackageImports config option to transform barrel imports automatically while keeping TypeScript support.

Does this guide work with React Server Components?▼

Yes, it includes dedicated server-side rules for RSC, such as minimizing serialization at RSC boundaries, avoiding shared module state for request data, using React.cache() for per-request deduplication, and authenticating Server Actions like public API routes.

When should I not use Suspense boundaries for data fetching?▼

Avoid Suspense when data is critical for layout decisions, when content is SEO-critical above the fold, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift when content loads.

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, useDeferredValue, functional setState, and transitions.