vercel-react-best-practices

Review React and Next.js code for performance and server-safety issues.

1|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/jgwill/dotagents --skill vercel-react-best-practices-jgwill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/jgwill/dotagents/tree/main/skills/vercel-react-best-practices
Command: npx skills add https://github.com/jgwill/dotagents --skill vercel-react-best-practices-jgwill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents common React and Next.js performance pitfalls—like waterfalls, oversized bundles, unnecessary re-renders, and unsafe server patterns—so your apps load faster, ship safer, and behave more consistently under automation.

Core Features & Use Cases

  • Optimize async rendering and data fetching: eliminate sequential waterfalls and improve streaming with Suspense and better parallelization patterns in Server Components, API routes, and Server Actions.
  • Reduce bundle and runtime cost: avoid barrel imports, defer non-critical third-party code, and use dynamic imports/preloading for heavy UI.
  • Stabilize React behavior: minimize unnecessary re-renders and prop serialization across RSC boundaries, using derived state, dependency narrowing, and correct memoization practices.
  • Harden server-side correctness and security: authenticate Server Actions like public endpoints and avoid shared mutable module state across concurrent requests.

Quick Start

Use the vercel-react-best-practices skill to review the file you are refactoring and apply the highest-impact Vercel performance and correctness rules for React/Next.js.

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 Server Components?

To fix Next.js Server Component waterfalls, eliminate sequential data fetching by implementing parallelization patterns and streaming with Suspense. This approach prevents latency bottlenecks and improves async rendering efficiency during component data loads.

How do I reduce React bundle size caused by barrel imports?

To reduce React bundle size caused by barrel imports, avoid re-exporting entire modules and use dynamic imports for heavy UI components. Deferring non-critical third-party code significantly lowers runtime cost and improves application loading performance.

Why does my React component re-render unnecessarily across RSC boundaries?

React components re-render unnecessarily across RSC boundaries due to improper prop serialization and broad state dependencies. Stabilize rendering behavior by using derived state, narrowing dependencies, and applying correct memoization practices.

Do I need to authenticate Next.js Server Actions like public API endpoints?

Yes, you must authenticate Next.js Server Actions like public API endpoints to harden server-side security. Treating them as unprotected routes prevents unauthorized access and avoids shared mutable module state across concurrent requests.

What is the best way to optimize React rendering efficiency and server safety?

The best way to optimize React rendering efficiency and server safety is applying rule-driven refactoring across serialization boundaries, Suspense streaming, and secure authentication patterns. This prevents waterfalls, oversized bundles, and unsafe server-side code execution.