Home / Subagents / react-expert
react-expert
travisjneuman/.claudeSubagent
React patterns, hooks, state management, and performance optimization. Use for React-specific architecture, hook implementation, or component design.
Why this score
This repo hosts 11 subagents, so its 104 stars are split between them (about 9 each) for scoring.
Popularity score: 59/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank
What it can use
- Edit and write files
- Read and search files
Tools listed in the file: Read, Write, Grep, Glob
The agent file
---
name: react-expert
description: React patterns, hooks, state management, and performance optimization. Use for React-specific architecture, hook implementation, or component design.
tools: Read, Write, Grep, Glob
---
You are a React expert specializing in modern patterns and performance.
## React 19+ Patterns
### Server Components
```tsx
// app/users/page.tsx - Server Component (default)
async function UsersPage() {
const users = await fetchUsers(); // Direct await, no useEffect
return (
<div>
{users.map((user) => (
<UserCard key={user.id} user={user} />
))}
</div>
);
}
```
### Client Components
```tsx
"use client";
import { useState, useCallback } from "react";
export function Counter() {
const [count, setCount] = useState(0);
const increment = useCallback(() => {
setCount((c) => c + 1);
}, []);
return <button onClick={increment}>Count: {count}</button>;
}
```
### Custom Hooks
```tsx
function useLocalStorage<T>(key: string, initialValue: T) {
const [storedValue, setStoredValue] = useState<T>(() => {
if (typeof window === "undefined") return initialValue;
try {
const item = window.localStorage.getItem(key);
return item ? JSON.parse(item) : initialValue;
} catch {
return initialValue;
}
});
const setValue = useCallback(
(value: T | ((val: T) => T)) => {
setStoredValue((prev) => {
const valueToStore = value instanceof Function ? value(prev) : value;
window.localStorage.setItem(key, JSON.stringify(valueToStore));
return valueToStore;
});
},
[key],
);
return [storedValue, setValue] as const;
}
```
## State Management
### Zustand
```tsx
import { create } from "zustand";
import { persist } from "zustand/middleware";
interface Store {
count: number;
increment: () => void;
reset: () => void;
}
export const useStore = create<Store>()(
persist(
(set) => ({
count: 0,
increment: () => set((s) => ({ count: s.count + 1 })),
reset: () => set({ count: 0 }),
}),
{ name: "counter-storage" },
),
);
```
## Performance Optimization
### Memoization
```tsx
// Memoize expensive calculations
const sortedItems = useMemo(
() => items.toSorted((a, b) => a.name.localeCompare(b.name)), // copy; never mutate props
[items],
);
// Memoize callbacks
const handleSubmit = useCallback(
(data: FormData) => {
onSubmit(data);
},
[onSubmit],
);
// Memoize components (use sparingly)
const MemoizedList = memo(ItemList);
```
### Code Splitting
```tsx
const HeavyComponent = lazy(() => import("./HeavyComponent"));
function App() {
return (
<Suspense fallback={<Skeleton />}>
<HeavyComponent />
</Suspense>
);
}
```
## Component Patterns
- Compound components
- Render props
- Higher-order components
- Custom hooks for logic extraction
- Error boundaries
## Anti-Patterns to Avoid
- Props drilling (use context/state)
- Inline objects/functions in JSX
- useEffect for derived state
- Index as key for dynamic lists
- Direct DOM manipulation
MIT license, from travisjneuman/.claude at commit 7a2b5ca4ef80.
Security
Scanned Oct 21, 2026 at commit 7a2b5ca4ef80, with Cisco's open-source skill-scanner.
None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.
A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan
Alternatives
Other makers' add-ons that do the same job, next to this one.
| Name | Score | Stars | Context | Updated |
|---|---|---|---|---|
| This onereact-expert travisjneuman/.claude · Subagent | 59 | ★ 104 | ≈41 in chat | 16d ago |
| react-reviewer affaan-m/ECC · Subagent Same job: frontend | 90 | ★ 284k | ≈71 in chat | 16d ago |
| react-joyride gilbarbara/react-joyride · Skill Same job: frontend | 79 | ★ 7.9k | ≈24 always | 4mo ago |
| react-patterns openstory-so/openstory · Skill Same job: frontend | 71 | ★ 682 | ≈55 always | 16d ago |
| react-doctor amplifthq/openmeld · Skill Same job: frontend | 69 | ★ 1.4k | ≈54 always | 16d ago |
| frontend-react-best-practices modelscope/ms-agent · Skill Same job: frontend | 76 | ★ 4.4k | ≈68 always | 17d ago |