Back to list
YuniorGlez

react-expert

by YuniorGlez

Transform your Gemini CLI into a high-performance autonomous agentic environment. This repository provides a curated collection of tactical skills, advanced agent configurations, and automated protocol hooks used by elite engineering teams.

0🍴 2📅 Jan 25, 2026

SKILL.md


name: react-expert id: react-expert version: 1.2.0 description: "Senior specialist in React 19.2+ performance, React Compiler (Forget), and advanced architectural patterns. Use when optimizing re-renders, bundle size, data fetching waterfalls (cacheSignal), or server-side efficiency (PPR)."

⚡ Skill: react-expert

Description

This skill provides comprehensive performance optimization guidance for React applications, optimized for AI-assisted workflows in 2026. It focuses on eliminating waterfalls, leveraging the React Compiler, and maximizing both server and client-side efficiency through modern APIs (use, useActionState, <Activity>).

Core Priorities

  1. Eliminating Waterfalls: The #1 priority. Move fetches as high as possible, parallelize operations, and use cacheSignal to prevent wasted work.
  2. React Compiler Optimization: Structuring code to be "Forget-friendly" (automatic memoization) while knowing when manual intervention is still needed.
  3. Partial Pre-rendering (PPR): Combining the best of static and dynamic rendering for sub-100ms LCP.
  4. Hydration Strategy: Avoiding "hydration mismatch" and using <Activity> for state preservation.

🏆 Top 5 Performance Gains in 2026

  1. React Compiler (Automatic Memoization): Removes the "useMemo tax". Code that adheres to "Rules of React" is automatically optimized.
  2. Partial Pre-rendering (PPR): Serves static shells instantly while streaming dynamic content in the same request.
  3. The use() API: Eliminates the useEffect + useState boilerplate for data fetching, reducing client-side code by up to 30%.
  4. cacheSignal: Allows the server to abort expensive async work if the client disconnects or navigates away.
  5. Server Actions + useActionState: Native handling of pending states and optimistic updates, reducing reliance on third-party form/state libraries.

Table of Contents & Detailed Guides

1. Eliminating WaterfallsCRITICAL

  • Defer Await Until Needed
  • cacheSignal for Lifecycle Management
  • Dependency-Based Parallelization (better-all)
  • Promise.all() for Independent Operations
  • Strategic Suspense Boundaries

2. Bundle Size OptimizationCRITICAL

  • Avoiding Barrel File Imports (Lucide, MUI, etc.)
  • Conditional Module Loading (Dynamic import())
  • Deferring Non-Critical Libraries (Analytics)
  • Preloading based on User Intent

3. Server-Side PerformanceHIGH

  • Partial Pre-rendering (PPR) Deep Dive
  • Cross-Request LRU Caching
  • Minimizing Serialization at RSC Boundaries
  • Parallel Data Fetching with Component Composition

4. Client-Side & Data FetchingMEDIUM-HIGH

  • use() API for Promises and Context
  • useActionState for Form Management
  • useOptimistic for Instant UI Feedback
  • Deduplicating Global Event Listeners

5. React Compiler & Re-rendersMEDIUM

  • Compiler Rules: Side-effect-free rendering
  • Deferring State Reads
  • Narrowing Effect Dependencies
  • Transitions for Non-Urgent Updates (startTransition)

6. Rendering PerformanceMEDIUM

  • <Activity> Component (Show/Hide with State preservation)
  • CSS content-visibility
  • Hydration Mismatch Prevention (No-Flicker)
  • Hoisting Static JSX

7. JavaScript Micro-OptimizationsLOW-MEDIUM

  • Batching DOM Changes
  • Index Maps vs .find()
  • toSorted() vs sort()

8. Advanced PatternsLOW

  • Event Handlers in Refs / useEffectEvent
  • useLatest for Stable Callback Refs

Quick Reference: The "Do's" and "Don'ts"

Don'tDo
import { Icon } from 'large-lib'import Icon from 'large-lib/Icon'
await a(); await b();Promise.all([a(), b()])
useEffect(() => { fetch(...) }, [])const data = use(dataPromise)
const [state, set] = useState(init())useState(() => init())
array.sort()array.toSorted()
searchParams in component bodysearchParams only in callbacks
Manual useMemo/useCallback (mostly)Trust React Compiler (but check Rules of React)

Optimized for React 19.2+ and Next.js 16.1+. Updated: January 22, 2026 - 14:59

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon