vercel-react-best-practices

Apply Vercel best practices to optimize React and Next.js performance.

1|Updated Nov 27, 2022
One-click install
npx skills add https://github.com/gonzalopozo/gonzalopozo.github.io --skill vercel-react-best-practices-gonzalopozo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/gonzalopozo/gonzalopozo.github.io/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/gonzalopozo/gonzalopozo.github.io --skill vercel-react-best-practices-gonzalopozo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Vercel React Best Practices skill consolidates React and Next.js performance optimization guidelines from Vercel Engineering to help teams write, review, and refactor code for faster, more reliable apps.

Core Features & Use Cases

  • Provides a categorized collection of high-impact performance rules across 8 categories, with explicit examples, to guide refactors, audits, and code generation.
  • Helps avoid common performance pitfalls like waterfalls, large bundle imports, and server/client data-fetch edges through explicit patterns (defer awaits, parallel fetches, Suspense boundaries, dynamic imports, etc.).
  • Use cases include evaluating new components, reviewing existing pages, and implementing performance-focused refactors in production Next.js apps.

Quick Start

Apply these guidelines to audit a React/Next.js project and implement the high-impact rules across waterfalls, bundle optimization, and server rendering.

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 reduce data fetching waterfalls in Next.js for faster server rendering?

Optimize React bundle size by using dynamic imports to code-split non-critical components. This prevents large dependencies from bloating the initial JavaScript payload, ensuring faster page loads for Next.js applications.

Where should I place Suspense boundaries in React for server rendering optimization?

Place Suspense boundaries strategically around components that suspend during server rendering to defer non-critical work. This allows the page to stream HTML progressively, improving perceived performance while maintaining robust data fetching patterns.

What are Vercel's best practices for server and client component serialization in React?

Vercel's best practices for server and client serialization require careful data passing between server and client components to avoid excessive payload transfer. Proper serialization maintains robust performance and prevents hydration mismatches in Next.js.

Can I use these React performance best practices to audit an existing Next.js project?

You can audit an existing Next.js project using these React performance best practices to evaluate components and implement refactors. The guidelines cover eight categories, helping identify and fix waterfalls, bundle bloat, and server rendering edge cases.