react-patterns

Featured

React 19 performance patterns and composition architecture for Vite + Cloudflare projects. 50+ rules ranked by impact — eliminating waterfalls, bundle optimisation, re-render prevention, composition over boolean props, server/client boundaries, and React 19 APIs. Use when writing, reviewing, or refactoring React components. Triggers: 'react patterns', 'react review', 'react performance', 'optimise components', 'react best practices', 'composition patterns', 'why is it slow', 'reduce re-renders', 'fix waterfall'.

Web & Frontend 1,031 stars 104 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# React Patterns Performance and composition patterns for React 19 + Vite + Cloudflare Workers projects. Use as a checklist when writing new components, a review guide when auditing existing code, or a refactoring playbook when something feels slow or tangled. Rules are ranked by impact. Fix CRITICAL issues before touching MEDIUM ones. ## When to Apply - Writing new React components or pages - Reviewing code for performance issues - Refactoring components with too many props or re-renders - Debugging "why is this slow?" or "why does this re-render?" - Building reusable component libraries - Code review before merging ## 1. Eliminating Waterfalls (CRITICAL) Sequential async calls where they could be parallel. The #1 performance killer. | Pattern | Problem | Fix | |---------|---------|-----| | **Await in sequence** | `const a = await getA(); const b = await getB();` | `const [a, b] = await Promise.all([getA(), getB()]);` | | **Fetch in child** | Parent renders, then child fetches, then grandchild fetches | Hoist fetches to the highest common ancestor, pass data down | | **Suspense cascade** | Multiple Suspense boundaries that resolve sequentially | One Suspense boundary wrapping all async siblings | | **Await before branch** | `const data = await fetch(); if (condition) { use(data); }` | Move await inside the branch — don't fetch what you might not use | | **Import then render** | `const Component = await import('./Heavy'); return <Component />` | Use `React.lazy()` + `<...

Details

Author
jezweb
Repository
jezweb/claude-skills
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

react-patterns

React 19 performance patterns and composition architecture for Vite + Cloudflare projects. 50+ rules ranked by impact — eliminating waterfalls, bundle optimisation, re-render prevention, composition over boolean props, server/client boundaries, and React 19 APIs. Use when writing, reviewing, or refactoring React components. Triggers: 'react patterns', 'react review', 'react performance', 'optimise components', 'react best practices', 'composition patterns', 'why is it slow', 'reduce re-renders', 'fix waterfall'.

1 Updated 1 weeks ago
SkotAlexsander
API & Backend Listed

react-performance

Use when writing, reviewing, or refactoring React 18/19 and Next.js code for performance. Organizes 70+ rules across 8 priority categories — eliminating waterfalls, bundle size, server-side, client fetching, re-render, rendering, JS micro-perf, and advanced patterns — with concrete correct/incorrect pairs and version-specific APIs (Next.js 15 after(), React 19 Activity, useEffectEvent, optimizePackageImports).

2 Updated 1 weeks ago
Mixard
Web & Frontend Listed

react-performance

Make React/Next.js render fast — eliminate data waterfalls, cut bundle size, and stop needless re-renders, as implementation constraints rather than a post-hoc profiling pass. Use when a React app feels slow, a route's data loads in a chain instead of in parallel, a bundle is too big, a list or form re-renders on every keystroke, or you reach for useMemo/memo/useTransition. Complements core-web-vitals-for-ui (which owns the INP/LCP/CLS field thresholds); this skill owns the React-level causes. Triggers on "React performance", "re-render", "useMemo/memo/useCallback", "waterfall", "bundle size", "code splitting", "useTransition", "Server Component perf", "slow list".

0 Updated 2 months ago
BenMacDeezy