react-best-practices

Apply React/Next.js performance optimization patterns across 8 rule categories.

Updated Sep 7, 2024
One-click install
npx skills add https://github.com/Asylcreek/home-manager --skill react-best-practices-asylcreek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/Asylcreek/home-manager/tree/main/dots/agents/skills/react-best-practices
Command: npx skills add https://github.com/Asylcreek/home-manager --skill react-best-practices-asylcreek

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React and Next.js performance challenges arise from suboptimal rendering, data fetching, and bloated bundles, slowing user experience.

Core Features & Use Cases

  • Comprehensive performance optimization guidelines across 8 categories, prioritized by impact to guide automated refactoring and code generation.
  • Rules spanning Eliminating Waterfalls, Bundle Size Optimization, Server-Side Performance, Client-Side Data Fetching, Re-render Optimization, Rendering Performance, JavaScript Performance, and Advanced Patterns.
  • Use the skill to inform code reviews, generate performance-focused code, and audit existing projects for bottlenecks.

Quick Start

Apply these guidelines to optimize a React/Next.js project for faster load times and better rendering.

Frequently Asked Questions about 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 when refactoring components?

To optimize React and Next.js performance, apply targeted refactoring patterns across 8 categories including bundle size reduction, server-side performance, and re-render optimization to guide automated code generation and eliminate rendering bottlenecks.

What's the best way to reduce bundle size in a Next.js application?

The best way to reduce bundle size in a Next.js application is to apply bundle optimization rules that prioritize high-impact refactoring patterns, streamline client-side data fetching, and eliminate unnecessary JavaScript loaded on the client.

How does eliminating waterfalls improve Next.js data fetching performance?

Eliminating waterfalls improves Next.js data fetching performance by restructuring asynchronous requests to run in parallel, reducing client-side wait times and optimizing server-side rendering workflows for faster overall page loads.

Can I use this approach to audit existing React projects for rendering bottlenecks?

Yes, you can use these performance optimization guidelines to audit existing React projects, informing code reviews by identifying suboptimal re-renders, bloated bundles, and inefficient data fetching patterns across 8 rule categories.

What are the limitations of automated React performance refactoring?

Automated React performance refactoring is limited by the context of your specific application architecture, meaning you must manually validate advanced patterns and server-side performance changes to ensure data fetching logic and rendering output remain correct.

Why does my React component re-render so often during data updates?

Your React component re-renders often during data updates due to unoptimized state management and prop passing; applying re-render optimization and advanced JavaScript performance patterns helps stabilize rendering and improve client-side execution.