vercel-react-best-practices

Identify and fix React/Next.js performance bottlenecks using prioritized rules.

Updated Dec 5, 2024
One-click install
npx skills add https://github.com/yeohj0710/wellnessbox --skill vercel-react-best-practices-yeohj0710
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/yeohj0710/wellnessbox/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/yeohj0710/wellnessbox --skill vercel-react-best-practices-yeohj0710

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill consolidates React and Next.js performance guidelines from Vercel Engineering to help teams write, review, and refactor code with proven performance patterns, reducing bottlenecks and regressions.

Core Features & Use Cases

  • 57 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
  • Clear guidance for eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript performance, and advanced patterns.
  • Use cases include code reviews, automated refactoring prompts, and generation of performance-conscious components and pages.

Quick Start

Review and apply the guidelines to React/Next.js tasks to ensure performance best practices are followed from the start.

Frequently Asked Questions about vercel-react-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for optimizing React and Next.js performance?

React and Next.js performance best practices involve applying 57 category-prioritized rules across bundle optimization, server-side rendering, data fetching, and re-render reduction to eliminate bottlenecks during code generation and refactoring.

How do I fix data fetching waterfalls in Next.js applications?

Fix data fetching waterfalls in Next.js by enforcing parallel data fetching patterns and utilizing Suspense boundaries, ensuring safety and correctness across client and server boundaries to reduce sequential loading bottlenecks.

How do I review React components for performance regressions?

Review React components for performance regressions by applying guidelines prioritized by impact, checking for bundle size optimization, client-side data fetching efficiency, and re-render optimization to catch bottlenecks during code reviews.

Can I use this guide for refactoring server actions and caching in Next.js?

Yes, you can use this guide for refactoring server actions and caching in Next.js because it enforces specific guardrails for server actions, Suspense, caching, and parallel data fetching across client/server boundaries.

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

The best way to reduce bundle size in a Next.js project is to apply performance guidelines focused on bundle size optimization and advanced patterns, ensuring code generation and automated refactoring prioritize minimal client-side JavaScript.