Tooluck logoTooluck
SKILL.md

react-dev

Agent skill fromsoftaworks/agent-toolkit

This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned. Covers type-safe patterns for React 18-19 including generic components, proper event typing, and routing integration (TanStack Router, React Router).

How to install react-dev

install react-dev
# install the agent-toolkit pack with the skills CLI
npx skills add softaworks/agent-toolkit

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

skills/react-dev/

# into

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

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

skills/react-dev/SKILL.md

MITFull file
1# React TypeScript
2
3Type-safe React = compile-time guarantees = confident refactoring.
4
5<when_to_use>
6
7- Building typed React components
8- Implementing generic components
9- Typing event handlers, forms, refs
10- Using React 19 features (Actions, Server Components, use())
11- Router integration (TanStack Router, React Router)
12- Custom hooks with proper typing
13
14NOT for: non-React TypeScript, vanilla JS React
15
16</when_to_use>
17
18<react_19_changes>
19
20React 19 breaking changes require migration. Key patterns:
21
22**ref as prop** - forwardRef deprecated:
23
24```typescript
25// React 19 - ref as regular prop
26type ButtonProps = {
27 ref?: React.Ref<HTMLButtonElement>;
28} & React.ComponentPropsWithoutRef<'button'>;
29
30function Button({ ref, children, ...props }: ButtonProps) {
31 return <button ref={ref} {...props}>{children}</button>;
32}
33```
34
35**useActionState** - replaces useFormState:
36
37```typescript
38import { useActionState } from 'react';
39
40type FormState = { errors?: string[]; success?: boolean };
41
42function Form() {
43 const [state, formAction, isPending] = useActionState(submitAction, {});
44 return <form action={formAction}>...</form>;
45}
46```
47
48**use()** - unwraps promises/context:
49
50```typescript
51function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
52 const user = use(userPromise); // Suspends until resolved
53 return <div>{user.name}</div>;
54}
55```
56
57See [react-19-patterns.md](references/react-19-patterns.md) for useOptimistic, useTransition, migration checklist.
58
59</react_19_changes>
60…

Excerpt shown under the repository's MIT license.

More skills in agent-toolkit

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates