react-development/SKILL.md
Comprehensive React patterns and best practices: functional components, all hooks (useState, useEffect, useCallback, useMemo, useRef, useContext, useReducer), custom hooks, state management (local/Context/external), performance optimisation...
npx skillsauth add peterbamuhigire/skills-web-dev react-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
react-development or would be better handled by a more specific companion skill.references only as needed.SKILL.md first, then load only the referenced deep-dive files that are necessary for the task.references/ directory for deep detail after reading the core workflow below.Production-grade React patterns drawn from Mastering React (Horton & Vice), Pro React (Antonio), and modern React 18/19 best practices.
| Topic | Reference |
|---|---|
| All hooks with examples | references/hooks.md |
| Custom hooks library | references/custom-hooks.md |
| State management patterns | references/state-management.md |
| Performance optimisation | references/performance.md |
| TypeScript + React | references/typescript.md |
| Testing (RTL) | references/testing.md |
| Forms and validation | references/forms.md |
| React 18/19 features | references/react-18-19.md |
function UserCard({ name, email, onSelect }) {
return (
<div className="user-card" onClick={() => onSelect(email)}>
<h3>{name}</h3>
<p>{email}</p>
</div>
);
}
Always use function declarations for named components. Arrow functions for callbacks only.
Build from small autonomous pieces. Parent owns state; children receive props and call callback props to signal events upward (unidirectional data flow).
function KanbanBoard() {
const [cards, setCards] = useState([]);
const addCard = (card) => setCards(prev => [...prev, card]);
const updateCard = (id, data) =>
setCards(prev => prev.map(c => c.id === id ? { ...c, ...data } : c));
return (
<div className="board">
{cards.map(card => (
<KanbanCard key={card.id} card={card} onUpdate={(d) => updateCard(card.id, d)} />
))}
<AddCardForm onAdd={addCard} />
</div>
);
}
function Card({ title, children, footer }) {
return (
<div className="card">
<h2>{title}</h2>
<div className="card__body">{children}</div>
{footer && <div className="card__footer">{footer}</div>}
</div>
);
}
// <Card title="Summary" footer={<button>Save</button>}><p>Content</p></Card>
// Presentational — pure UI, all data via props
function TaskList({ tasks, onToggle }) {
return (
<ul>
{tasks.map(t => (
<li key={t.id} className={t.done ? 'done' : ''} onClick={() => onToggle(t.id)}>
{t.name}
</li>
))}
</ul>
);
}
// Container — fetches data, manages state, delegates rendering
function TaskListContainer() {
const [tasks, setTasks] = useState([]);
useEffect(() => { fetchTasks().then(setTasks); }, []);
const toggle = (id) =>
setTasks(prev => prev.map(t => t.id === id ? { ...t, done: !t.done } : t));
return <TaskList tasks={tasks} onToggle={toggle} />;
}
Extended guidance for react-development was moved to references/skill-deep-dive.md to keep this entrypoint compact and fast to load.
Use that deep dive for:
2. Core Hooks — Quick Reference3. Custom Hooks4. State Management5. Performance Optimisation6. Forms7. Error Boundaries8. React 18 / 19 Concurrent Features9. Testing10. Anti-Patterns Checklist11. Architecture Checklistdata-ai
Use when adding AI-powered analytics to a SaaS platform — semantic search over business data, natural language queries, trend detection, anomaly alerts, and AI-generated insights for dashboards. Covers embeddings, NL2SQL, and per-tenant analytics...
data-ai
Design AI-powered analytics dashboards — what metrics to show, how to display AI predictions and confidence, drill-down patterns, KPI cards, trend visualisation, AI Insights panels, export design, and role-based dashboard variants. Invoke when...
development
Use when designing, building, reviewing, or upgrading production software systems that must be secure, performant, maintainable, scalable, and user-centered. Apply before writing specs, code, architecture, APIs, databases, mobile apps, SaaS platforms, or ERP systems.
development
Professional web app UI using commercial templates (Tabler/Bootstrap 5) with strong frontend design direction when needed. Use for CRUD interfaces, dashboards, admin panels with SweetAlert2, DataTables, Flatpickr. Clone seeder-page.php, use...