vercel-react-best-practices

Applies Vercel's React and Next.js performance optimization rules during code writing and review.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill vercel-react-best-practices-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill vercel-react-best-practices-zamansepeti43

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, and unnecessary re-renders that are hard to spot during development and code review. ## Core Features & Use Cases - 65 Prioritized Rules: Covers 8 categories from eliminating waterfalls (CRITICAL) to advanced patterns (LOW), each with incorrect vs. correct code examples. - Structured Rule Files: Individual rule files organized by prefix (async-, bundle-, server-, client-, rerender-, rendering-, js-, advanced-) for targeted lookup. - Use Case: When refactoring a Next.js page that loads slowly, reference the waterfall and bundle rules to convert sequential awaits into Promise.all() calls and replace barrel imports with direct imports. ## Quick Start Review my Next.js page component for performance issues using the React best practices rules and suggest fixes for any waterfalls or bundle problems.

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

Start independent async operations immediately and await them together with Promise.all(), or use better-all for partial dependency chains. In Server Components, restructure with component composition so sibling components fetch in parallel instead of sequentially.

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 optimizePackageImports config; otherwise import directly from subpaths like '@mui/material/Button'.

When should I use Suspense boundaries in React?

Use Suspense when non-critical data fetching blocks your layout from rendering. Wrap the data-dependent component in Suspense so the surrounding UI paints immediately. Avoid it for SEO-critical content or when layout shift would harm UX.

Do Server Actions need authentication checks?

Yes, Server Actions are public endpoints and must verify authentication and authorization inside each action. Do not rely on middleware or layout guards alone, since actions can be invoked directly by any client.

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 rerender-prefixed rules cover functional setState, useDeferredValue, and transitions for these cases.