vercel-react-best-practices

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

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/raulisai/eva02 --skill vercel-react-best-practices-raulisai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/raulisai/eva02/tree/main/.agents/skills/react-best-practices
Command: npx skills add https://github.com/raulisai/eva02 --skill vercel-react-best-practices-raulisai

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, oversized bundles, and sequential data-fetching waterfalls. This Skill gives AI agents a structured, prioritized rulebook of 70 performance guidelines from Vercel Engineering so generated and refactored code follows proven optimization patterns instead of common anti-patterns. ## Core Features & Use Cases - Prioritized Rule Catalog: 70 rules across 8 categories ranked by impact, from critical waterfall elimination and bundle size reduction to advanced hook patterns. - Incorrect vs. Correct Examples: Every rule includes side-by-side TypeScript/TSX code examples showing the anti-pattern and the optimized implementation. - EVA Project Overrides: Project-specific guardrails for multi-tenant, org_id-scoped applications that prevent tenant data leaks into shared module state or unscoped caches. - Use Case: When asked to optimize a slow Next.js dashboard page, the agent consults rules like async-parallel to parallelize data fetches with Promise.all(), bundle-barrel-imports to fix costly barrel imports, and rerender-memo to eliminate wasted re-renders. ## Quick Start Ask the agent to review your React component or Next.js page for performance issues and apply the Vercel best practices rules to fix waterfalls, bundle bloat, and unnecessary re-renders.

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 Suspense boundaries so layout renders while data streams in.

How to reduce React bundle size from barrel file imports?

Import directly from source files instead of barrel entry points that re-export thousands of modules. In Next.js 13.5+, use the optimizePackageImports config option to automatically transform barrel imports for libraries like lucide-react and @mui/material.

When should I use React.cache versus an LRU cache in Next.js?

Use React.cache() for per-request deduplication so the same fetch runs once per render pass. Use a cross-request LRU cache for data shared across requests, but never store tenant-scoped data without keying it by organization.

Does this skill work with Next.js Server Actions security?

Yes, it includes a rule requiring authentication and authorization checks inside every Server Action, treating them as public endpoints. Middleware or layout guards alone are insufficient because Server Actions can be invoked directly.

Why do React components re-render unnecessarily and how to fix it?

Common causes include defining components inside components, unstable callback props, and broad effect dependencies. Fixes include extracting memoized components, using functional setState, narrowing effect dependencies, and deferring non-urgent updates with useTransition or useDeferredValue.

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, or when queries are fast enough that the loading-to-content layout shift hurts UX more than the wait.