vercel-react-best-practices

Identify and fix React/Next.js performance bottlenecks across data fetching, rendering, and bundle size.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React and Next.js projects often struggle with performance due to waterfalls, large bundles, and inefficient data fetching patterns. This skill provides a vetted set of best practices from Vercel Engineering to detect and remediate these issues.

Core Features & Use Cases

  • 57 rules across 8 categories covering eliminating waterfalls, bundle optimization, server-side performance, client-side data fetching, rendering, and JavaScript performance.
  • Effective for code reviews, refactors, and implementing high-performance React/Next.js features in production.
  • Real-world scenarios include optimizing data fetching, Suspense boundaries, and reducing bundle sizes for faster TTI/LCP.

Quick Start

Review code and apply the guidelines to optimize performance across components, pages, and data flows.

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 eliminate data fetching waterfalls in my React and Next.js project?

To eliminate data fetching waterfalls in your React and Next.js project, apply parallel data fetching patterns and Suspense boundaries to unblock rendering and reduce sequential network requests. This skill enforces specific rules to detect and remediate these waterfall bottlenecks.

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

The best way to reduce bundle size and improve TTI in a Next.js application is to apply bundle optimization rules, including code splitting and dynamic imports. This skill provides vetted guidelines to detect large bundles and optimize client-side JavaScript performance.

How do I optimize server-side rendering performance for React components?

To optimize server-side rendering performance for React components, review your data flows and apply server-side performance rules to ensure efficient data fetching. This skill identifies bottlenecks across pages and components to enforce production-grade SSR improvements.

Can I use these React best practices for code reviews and refactoring existing components?

Yes, you can use these React best practices for code reviews and refactoring existing components. The skill applies a comprehensive rule set across 8 categories to evaluate data fetching, rendering, and bundle size, making it effective for production-grade refactors.

Why does my React app have slow rendering and large bundle size despite using Next.js?

Your React app has slow rendering and large bundle size due to inefficient data fetching patterns and unoptimized client-side JavaScript. This skill identifies these exact performance bottlenecks and enforces 57 rules across rendering and bundle optimization to remediate them.

Does this performance optimization approach work with Suspense boundaries and client-side data fetching?

Yes, this performance optimization approach works with Suspense boundaries and client-side data fetching. It includes targeted rules for optimizing Suspense boundaries and client-side data flows to achieve faster TTI and LCP in your React and Next.js application.