vercel-react-best-practices

Optimize React and Next.js code for performance regressions.

264|11|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/coco-research/coco --skill vercel-react-best-practices-coco-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/coco-research/coco/tree/main/skills/vercel-react-best-practices
Command: npx skills add https://github.com/coco-research/coco --skill vercel-react-best-practices-coco-research

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers avoid common React and Next.js performance mistakes that slow down apps, increase bundle size, and create avoidable rendering or data-fetching bottlenecks.

Core Features & Use Cases

  • Eliminate waterfalls by restructuring async work, Suspense boundaries, and server component composition for faster initial rendering.
  • Reduce bundle weight by choosing direct imports, dynamic imports, conditional loading, and deferred third-party scripts.
  • Improve rendering correctness and responsiveness with memoization, derived state, stable callbacks, hydration-safe patterns, and efficient client-side data handling.
  • Use case: Review a Next.js page, identify sequential fetches and heavy client imports, and rewrite the code so it loads faster and re-renders less often.

Quick Start

Ask the assistant to review your React or Next.js code and refactor it to follow these performance best practices.

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 server components?

To eliminate data fetching waterfalls in Next.js, restructure sequential async work using parallel fetching, Suspense boundaries, and strategic server component composition. This prevents fetches from blocking initial rendering and speeds up page load times.

What is the best way to reduce React bundle size caused by heavy client imports?

Reducing React bundle size involves using direct imports to avoid pulling entire libraries, applying dynamic imports for conditional loading, and deferring third-party scripts. These optimization strategies ensure your production codebase loads faster with fewer unnecessary client-side dependencies.

How do I fix unnecessary re-renders and improve React component performance?

Fixing unnecessary re-renders requires applying memoization, deriving state correctly, and stabilizing callbacks. Implementing these rendering behavior constraints and hydration-safe patterns ensures efficient client-side data handling and improves overall component responsiveness.

Does this approach work for refactoring existing production React codebases?

Yes, this approach is specifically designed for refactoring tasks in production codebases. It enforces best-practice constraints like serialization minimization and caching to review existing React and Next.js pages, identify bottlenecks, and rewrite code for reliable AI-assisted implementation.

When should I use memoization versus derived state for React optimization?

Use memoization to prevent expensive recalculations when inputs remain unchanged, and use derived state to compute values directly from existing props or state without triggering extra renders. Choosing correctly between them eliminates redundant processing and maintains correct rendering behavior.