vercel-react-best-practices

Apply React and Next.js performance best practices to optimize components, pages, and bundles.

12|1|Updated Apr 3, 2024
One-click install
npx skills add https://github.com/getsentry/webvitals.com --skill vercel-react-best-practices-getsentry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/getsentry/webvitals.com/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/getsentry/webvitals.com --skill vercel-react-best-practices-getsentry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides comprehensive performance optimization guidelines for React and Next.js, helping teams reduce loading times, improve runtime performance, and streamline development through standardized best practices.

Core Features & Use Cases

  • 57 rules across 8 categories covering best practices for eliminating waterfalls, bundle optimization, server-side performance, client data fetching, re-render strategies, rendering performance, JavaScript optimization, and advanced patterns.
  • Practical guidance with code examples, real-world issues, and implementation steps to accelerate reviews and automated code generation.
  • Ideal for engineering teams aiming to raise performance benchmarks across new and refactored React/Next.js code.

Quick Start

Analyze your codebase against the 57 rules and implement the top-priority performance improvements.

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 during code reviews?

To optimize React and Next.js performance during code reviews, apply a structured rule set covering bundle optimization, server-side efficiency, and re-render strategies. This provides 57 actionable rules with practical code examples to identify and resolve loading and runtime bottlenecks.

What are the best practices for reducing bundle size in Next.js applications?

Best practices for reducing bundle size in Next.js involve applying specific bundle optimization rules, such as analyzing client-side JavaScript tweaks and rendering patterns. The skill provides targeted guidance to eliminate unnecessary code and streamline client bundles.

How do I prevent data fetching waterfalls in React server components?

To prevent data fetching waterfalls in React server components, apply rules focused on eliminating sequential fetches and improving server-side performance. The guidelines help restructure data fetching logic to load data in parallel and optimize server/client rendering efficiency.

Can I use these React performance guidelines for refactoring existing codebases?

Yes, you can use these React performance guidelines for refactoring existing codebases. The rules are ideal for raising performance benchmarks across both new and refactored React/Next.js code, offering implementation steps for data fetching, rendering, and bundle improvements.

When should I optimize client-side data fetching versus server-side rendering in Next.js?

You should optimize client-side data fetching versus server-side rendering in Next.js by evaluating rules across both categories. The skill provides distinct guidance for server-side performance and client-side fetching to help determine the most efficient rendering pattern for your components.