vercel-react-best-practices

Apply Vercel performance patterns to React and Next.js projects.

5|Updated Sep 17, 2022
One-click install
npx skills add https://github.com/kevinxo328/mercari-scraper --skill vercel-react-best-practices-kevinxo328
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/kevinxo328/mercari-scraper/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/kevinxo328/mercari-scraper --skill vercel-react-best-practices-kevinxo328

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React and Next.js performance can be inconsistent across teams. This skill consolidates Vercel-engineered best practices to help you consistently write, review, and refactor high-performance React/Next.js code.

Core Features & Use Cases

  • Provides 57 rules across 8 priority categories, covering eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimizations, rendering performance, JavaScript performance, and advanced patterns; intended to guide automated refactoring and code generation as well as human reviews.
  • Useful when writing new React components or Next.js pages, auditing existing code for performance issues, refactoring for safer performance gains, and optimizing bundle size or load times.
  • Includes concrete examples, guardrails, and recommended pipelines to enforce best practices in production code.

Quick Start

Review a React/Next.js project and apply the documented performance patterns to improve load times and interactivity.

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 optimize React and Next.js performance for faster loading and interactivity?

Optimize React and Next.js performance by applying patterns like minimizing waterfalls, using Suspense, and avoiding barrel imports. These practices improve loading, interactivity, and bundle size across client and server contexts.

What is the best way to reduce bundle size in a Next.js project?

The best way to reduce bundle size is avoiding barrel imports and applying per-section server and client performance rules. These optimizations ensure structure, safety, and maintainability while cutting down unnecessary JavaScript.

How do I eliminate data fetching waterfalls in React components?

Eliminate data fetching waterfalls by restructuring component data fetching to run in parallel. Applying Vercel-engineered best practices helps refactor code to minimize sequential requests and improve load times.

Can I use Suspense to improve loading performance in Next.js pages?

Yes, you can use Suspense to improve loading performance in Next.js pages. Implementing Suspense patterns helps manage asynchronous rendering and enhances user interactivity during data fetching.

When should I refactor existing React code for performance issues?

Refactor existing React code for performance issues when auditing for safer performance gains or optimizing bundle size. Apply documented performance patterns to ensure maintainability and safer refactoring outcomes.

Does this approach cover both client-side and server-side React performance rules?

Yes, this approach covers both client-side and server-side React performance rules. It applies distinct per-section guidelines for server actions, client-side data fetching, and build-time optimizations across contexts.