vercel-react-best-practices

Apply prioritized React/Next.js performance rules during code writing, review, and refactoring.

30|1|Updated Feb 19, 2022
One-click install
npx skills add https://github.com/princejoogie/dotfiles --skill vercel-react-best-practices-princejoogie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/princejoogie/dotfiles/tree/main/opencode/.config/opencode/skills/vercel-react-best-practices
Command: npx skills add https://github.com/princejoogie/dotfiles --skill vercel-react-best-practices-princejoogie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React/Next.js performance guidance is scattered and hard to enforce; this skill consolidates vetted best practices from Vercel Engineering to drive faster, more reliable apps.

Core Features & Use Cases

  • 57 rules across 8 categories covering eliminating waterfalls, bundle size, server-side performance, client-side data fetching, rendering performance, JavaScript performance, and advanced patterns.
  • Applies during writing, reviewing, or refactoring React/Next.js code to optimize performance for components, pages, data fetching, and bundles.
  • Enables automated guidance and code-generation prompts to steer consistent improvements.

Quick Start

Apply top-priority performance rules to a sample React/Next.js component and iteratively optimize it.

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 eliminating data-fetching waterfalls, minimizing bundle size, and optimizing server-side rendering. This resource consolidates 57 vetted rules across 8 categories to guide writing, reviewing, and refactoring code for faster apps.

How do I enforce consistent performance rules during a React code review?

To enforce performance rules during a React code review, apply a prioritized, rule-based approach covering client-side data fetching and rendering. This enables automated guideline enforcement and code-generation prompts to steer consistent improvements across components and pages.

How do I refactor Next.js components to eliminate data-fetching waterfalls?

Refactoring Next.js components to eliminate waterfalls requires applying specific server-side performance and data-fetching patterns. This resource provides vetted rules to safely refactor code, ensuring reliable data fetching and optimized rendering performance.

Can I use these React performance patterns for both writing new code and refactoring existing pages?

Yes, these React performance patterns apply to both writing new code and refactoring existing pages. The rules cover components, data fetching, and bundle size, supporting automated refactoring and safe code generation across various scenarios.

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

The best way to reduce JavaScript bundle size in a Next.js application is to apply targeted performance rules. This resource provides specific bundle size and JavaScript performance patterns to iteratively optimize components and pages for faster load times.

Why should I use a rule-based approach for React and Next.js code optimization?

A rule-based approach for React and Next.js code optimization solves the problem of scattered and hard-to-enforce performance guidance. It consolidates vetted engineering practices into a single resource, enabling safe code generation and consistent improvements.