react-best-practices

Optimize React 18+ and Next.js app rendering, data fetching, and bundle size.

7|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/skeletorflet/opencode-kit --skill react-best-practices-skeletorflet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/skeletorflet/opencode-kit/tree/main/.opencode/skills/react-best-practices
Command: npx skills add https://github.com/skeletorflet/opencode-kit --skill react-best-practices-skeletorflet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Improve the performance of React 18+ and Next.js applications by identifying bottlenecks, optimizing rendering, and guiding server/client component usage to minimize waterfalls and bundle size.

Core Features & Use Cases

  • Guidance on server and client component usage to maximize rendering efficiency and correct data fetching.
  • Memoization, code-splitting, and tree-shaking strategies to reduce bundle size and improve load times.
  • Performance profiling workflows tailored for Next.js projects, including guidance on measuring and validating improvements.

Quick Start

Provide a React 18+ or Next.js component you want optimized and I will apply server/client component guidance, memoization, and code-splitting strategies to improve performance.

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 18 and Next.js app performance by fixing server and client component boundaries?

To optimize React 18 and Next.js app performance, apply best-practice guidance for server and client component boundaries to maximize rendering efficiency and correct data fetching, minimizing waterfalls. This approach ensures faster user experiences by correctly separating server-side data fetching from client-side interactions.

What's the best way to reduce bundle size in a Next.js project using code-splitting and memoization?

The best way to reduce bundle size in a Next.js project is by applying memoization, code-splitting, and tree-shaking strategies. These techniques reduce unnecessary JavaScript payloads and improve load times by splitting your application into smaller chunks loaded on demand.

How does memoization improve rendering efficiency in modern React applications?

Memoization improves rendering efficiency in modern React applications by preventing unnecessary component re-renders. By caching previous render results, memoization ensures components only update when their props change, reducing rendering waterfalls and improving overall user experience performance.

Can I use this approach to profile and validate performance improvements in my React components?

Yes, you can use tailored performance profiling workflows to measure and validate improvements in React components. The process includes applying linting and type checking validation steps to ensure robust performance optimizations during component profiling and refactoring tasks.

Why does my Next.js application have data fetching waterfalls and how do I minimize them?

Data fetching waterfalls in Next.js applications occur when requests are sequenced unnecessarily. You minimize them by applying best-practice server and client component guidance to parallelize data fetching, reducing sequential loading and improving rendering efficiency.

When should I not use client components in a Next.js application?

You should avoid using client components in a Next.js application when the component does not require interactivity or client-side state. Keeping static content in server components minimizes bundle size and maximizes rendering efficiency.