Tooluck logoTooluck
SKILL.md

react-patterns

Agent skill fromjezweb/claude-skills

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'.

How to install react-patterns

install react-patterns
# install the claude-skills pack with the skills CLI
npx skills add jezweb/claude-skills

# or add only this skill to Claude Code: copy the folder

plugins/frontend/skills/react-patterns/

# into

~/.claude/skills/react-patterns/ (all projects)

.claude/skills/react-patterns/ (one project)

plugins/frontend/skills/react-patterns/SKILL.md

MITFull file
1# React Patterns
2
3Performance 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.
4
5Rules are ranked by impact. Fix CRITICAL issues before touching MEDIUM ones.
6
7## When to Apply
8
9- Writing new React components or pages
10- Reviewing code for performance issues
11- Refactoring components with too many props or re-renders
12- Debugging "why is this slow?" or "why does this re-render?"
13- Building reusable component libraries
14- Code review before merging
15
16## 1. Eliminating Waterfalls (CRITICAL)
17
18Sequential async calls where they could be parallel. The #1 performance killer.
19
20| Pattern | Problem | Fix |
21|---------|---------|-----|
22| **Await in sequence** | `const a = await getA(); const b = await getB();` | `const [a, b] = await Promise.all([getA(), getB()]);` |
23| **Fetch in child** | Parent renders, then child fetches, then grandchild fetches | Hoist fetches to the highest common ancestor, pass data down |
24| **Suspense cascade** | Multiple Suspense boundaries that resolve sequentially | One Suspense boundary wrapping all async siblings |
25| **Await before branch** | `const data = await fetch(); if (condition) { use(data); }` | Move await inside the branch — don't fetch what you might not use |
26…

Excerpt shown under the repository's MIT license.

More skills in claude-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates