vercel-react-best-practices

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

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/DCueto/zen-track --skill vercel-react-best-practices-dcueto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/DCueto/zen-track/tree/main/ZenTrackApp/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/DCueto/zen-track --skill vercel-react-best-practices-dcueto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from performance issues like data-fetching waterfalls, bloated bundles, unnecessary re-renders, and slow server responses. This Skill provides 69 prioritized, actionable rules from Vercel Engineering so AI agents and developers consistently apply proven optimization patterns instead of guessing. ## Core Features & Use Cases - 69 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 prioritized by impact from CRITICAL to LOW. - Incorrect vs. Correct Examples: Every rule includes concrete code comparisons with explanations and impact metrics to guide automated refactoring and code review. - Use Case: When reviewing a Next.js page that sequentially awaits user, posts, and comments fetches, apply the async-parallel rule to rewrite it with 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 React best practices and suggest performance improvements.

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?▼

Execute independent async operations concurrently with Promise.all() instead of sequential awaits. For partial dependencies, start promises early and await late, or use the better-all library to maximize parallelism automatically.

How to reduce bundle size from barrel file imports?▼

Avoid importing from barrel files like lucide-react or @mui/material entry points, which can load thousands of modules. In Next.js 13.5+, use the optimizePackageImports config option; otherwise import directly from source file paths.

Does this guide work with React Server Components?▼

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

When should I use Suspense boundaries in React?▼

Use Suspense to stream data-dependent sections while rendering the surrounding layout immediately, improving initial paint. Avoid it for SEO-critical above-the-fold content, layout-determining data, or very fast queries where 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 optimization rules provide 15 targeted fixes with code examples.

What are the limitations of React.cache() for data fetching?▼

React.cache() only deduplicates within a single request, so it cannot share data across sequential requests. For cross-request caching, use an LRU cache like lru-cache, which is especially effective with Vercel Fluid Compute.