vercel-react-best-practices

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

Updated Feb 22, 2026
One-click install
npx skills add https://github.com/mashharuki/CareTech-Catalyst-Hackathon --skill vercel-react-best-practices-mashharuki
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/mashharuki/CareTech-Catalyst-Hackathon/tree/main/.trae/skills/vercel-react-best-practices
Command: npx skills add https://github.com/mashharuki/CareTech-Catalyst-Hackathon --skill vercel-react-best-practices-mashharuki

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 established performance patterns. This Skill provides a structured, prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven optimizations. ## Core Features & Use Cases - 45 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 wrong pattern, the right pattern, and quantified impact (e.g., 2-10x improvement from parallelizing fetches). - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, the Skill directs you to use Promise.all() or better-all, cutting three network round trips down 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.

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

Start independent promises immediately without awaiting them, then await together with Promise.all. For partial dependencies, use the better-all library so each task starts at the earliest possible moment, yielding 2-10x improvements.

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

Import directly from source files instead of barrel entry points, for example importing from lucide-react/dist/esm/icons/check rather than the package root. In Next.js 13.5+, configure experimental.optimizePackageImports to transform barrel imports automatically at build time.

Does React.cache() work across multiple requests?▼

No, React.cache() only deduplicates within a single request. For cross-request caching, use an LRU cache like the lru-cache package, which is especially effective with Vercel Fluid Compute where function instances are shared.

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 layout shift from loading to content would harm the user experience.

Why does my React component re-render too often?▼

Common causes include subscribing to continuous values instead of derived booleans, using object dependencies in effects instead of primitives, and reading state in components that only need it inside callbacks. Narrow effect dependencies and defer state reads to the usage point.