[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72D79M3PKQJNQD3ZNP4PWFX":3,"skill-same:01M72D79M3PKQJNQD3ZNP4PWFX":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M72D79M3PKQJNQD3ZNP4PWFX","react-dev",null,"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).","Sansar35\u002Fclaude-agent","Sansar35","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F145020281?v=4","01M724CQ2SCC86MGNSD87D0D4K","01M724CQ3965G9WJ3QXE3AJ5YY",1,"MIT","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: react-dev\nversion: 1.0.0\ndescription: 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).\n---\n\n# React TypeScript\n\nType-safe React = compile-time guarantees = confident refactoring.\n\n\u003Cwhen_to_use>\n\n- Building typed React components\n- Implementing generic components\n- Typing event handlers, forms, refs\n- Using React 19 features (Actions, Server Components, use())\n- Router integration (TanStack Router, React Router)\n- Custom hooks with proper typing\n\nNOT for: non-React TypeScript, vanilla JS React\n\n\u003C\u002Fwhen_to_use>\n\n\u003Creact_19_changes>\n\nReact 19 breaking changes require migration. Key patterns:\n\n**ref as prop** - forwardRef deprecated:\n\n```typescript\n\u002F\u002F React 19 - ref as regular prop\ntype ButtonProps = {\n  ref?: React.Ref\u003CHTMLButtonElement>;\n} & React.ComponentPropsWithoutRef\u003C'button'>;\n\nfunction Button({ ref, children, ...props }: ButtonProps) {\n  return \u003Cbutton ref={ref} {...props}>{children}\u003C\u002Fbutton>;\n}\n```\n\n**useActionState** - replaces useFormState:\n\n```typescript\nimport { useActionState } from 'react';\n\ntype FormState = { errors?: string[]; success?: boolean };\n\nfunction Form() {\n  const [state, formAction, isPending] = useActionState(submitAction, {});\n  return \u003Cform action={formAction}>...\u003C\u002Fform>;\n}\n```\n\n**use()** - unwraps promises\u002Fcontext:\n\n```typescript\nfunction UserProfile({ userPromise }: { userPromise: Promise\u003CUser> }) {\n  const user = use(userPromise); \u002F\u002F Suspends until resolved\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\nSee [react-19-patterns.md](references\u002Freact-19-patterns.md) for useOptimistic, useTransition, migration checklist.\n\n\u003C\u002Freact_19_changes>\n\n\u003Ccomponent_patterns>\n\n**Props** - extend native elements:\n\n```typescript\ntype ButtonProps = {\n  variant: 'primary' | 'secondary';\n} & React.ComponentPropsWithoutRef\u003C'button'>;\n\nfunction Button({ variant, children, ...props }: ButtonProps) {\n  return \u003Cbutton className={variant} {...props}>{children}\u003C\u002Fbutton>;\n}\n```\n\n**Children typing**:\n\n```typescript\ntype Props = {\n  children: React.ReactNode;          \u002F\u002F Anything renderable\n  icon: React.ReactElement;           \u002F\u002F Single element\n  render: (data: T) => React.ReactNode;  \u002F\u002F Render prop\n};\n```\n\n**Discriminated unions** for variant props:\n\n```typescript\ntype ButtonProps =\n  | { variant: 'link'; href: string }\n  | { variant: 'button'; onClick: () => void };\n\nfunction Button(props: ButtonProps) {\n  if (props.variant === 'link') {\n    return \u003Ca href={props.href}>Link\u003C\u002Fa>;\n  }\n  return \u003Cbutton onClick={props.onClick}>Button\u003C\u002Fbutton>;\n}\n```\n\n\u003C\u002Fcomponent_patterns>\n\n\u003Cevent_handlers>\n\nUse specific event types for accurate target typing:\n\n```typescript\n\u002F\u002F Mouse\nfunction handleClick(e: React.MouseEvent\u003CHTMLButtonElement>) {\n  e.currentTarget.disabled = true;\n}\n\n\u002F\u002F Form\nfunction handleSubmit(e: React.FormEvent\u003CHTMLFormElement>) {\n  e.preventDefault();\n  const formData = new FormData(e.currentTarget);\n}\n\n\u002F\u002F Input\nfunction handleChange(e: React.ChangeEvent\u003CHTMLInputElement>) {\n  console.log(e.target.value);\n}\n\n\u002F\u002F Keyboard\nfunction handleKeyDown(e: React.KeyboardEvent\u003CHTMLInputElement>) {\n  if (e.key === 'Enter') e.currentTarget.blur();\n}\n```\n\nSee [event-handlers.md](references\u002Fevent-handlers.md) for focus, drag, clipboard, touch, wheel events.\n\n\u003C\u002Fevent_handlers>\n\n\u003Chooks_typing>\n\n**useState** - explicit for unions\u002Fnull:\n\n```typescript\nconst [user, setUser] = useState\u003CUser | null>(null);\nconst [status, setStatus] = useState\u003C'idle' | 'loading'>('idle');\n```\n\n**useRef** - null for DOM, value for mutable:\n\n```typescript\nconst inputRef = useRef\u003CHTMLInputElement>(null);  \u002F\u002F DOM - use ?.\nconst countRef = useRef\u003Cnumber>(0);               \u002F\u002F Mutable - direct access\n```\n\n**useReducer** - discriminated unions for actions:\n\n```typescript\ntype Action =\n  | { type: 'increment' }\n  | { type: 'set'; payload: number };\n\nfunction reducer(state: State, action: Action): State {\n  switch (action.type) {\n    case 'set': return { ...state, count: action.payload };\n    default: return state;\n  }\n}\n```\n\n**Custom hooks** - tuple returns with as const:\n\n```typescript\nfunction useToggle(initial = false) {\n  const [value, setValue] = useState(initial);\n  const toggle = () => setValue(v => !v);\n  return [value, toggle] as const;\n}\n```\n\n**useContext** - null guard pattern:\n\n```typescript\nconst UserContext = createContext\u003CUser | null>(null);\n\nfunction useUser() {\n  const user = useContext(UserContext);\n  if (!user) throw new Error('useUser outside UserProvider');\n  return user;\n}\n```\n\nSee [hooks.md](references\u002Fhooks.md) for useCallback, useMemo, useImperativeHandle, useSyncExternalStore.\n\n\u003C\u002Fhooks_typing>\n\n\u003Cgeneric_components>\n\nGeneric components infer types from props - no manual annotations at call site.\n\n**Pattern** - keyof T for column keys, render props for custom rendering:\n\n```typescript\ntype Column\u003CT> = {\n  key: keyof T;\n  header: string;\n  render?: (value: T[keyof T], item: T) => React.ReactNode;\n};\n\ntype TableProps\u003CT> = {\n  data: T[];\n  columns: Column\u003CT>[];\n  keyExtractor: (item: T) => string | number;\n};\n\nfunction Table\u003CT>({ data, columns, keyExtractor }: TableProps\u003CT>) {\n  return (\n    \u003Ctable>\n      \u003Cthead>\n        \u003Ctr>{columns.map(col => \u003Cth key={String(col.key)}>{col.header}\u003C\u002Fth>)}\u003C\u002Ftr>\n      \u003C\u002Fthead>\n      \u003Ctbody>\n        {data.map(item => (\n          \u003Ctr key={keyExtractor(item)}>\n            {columns.map(col => (\n              \u003Ctd key={String(col.key)}>\n                {col.render ? col.render(item[col.key], item) : String(item[col.key])}\n              \u003C\u002Ftd>\n            ))}\n          \u003C\u002Ftr>\n        ))}\n      \u003C\u002Ftbody>\n    \u003C\u002Ftable>\n  );\n}\n```\n\n**Constrained generics** for required properties:\n\n```typescript\ntype HasId = { id: string | number };\n\nfunction List\u003CT extends HasId>({ items }: { items: T[] }) {\n  return \u003Cul>{items.map(item => \u003Cli key={item.id}>...\u003C\u002Fli>)}\u003C\u002Ful>;\n}\n```\n\nSee [generic-components.md](examples\u002Fgeneric-components.md) for Select, List, Modal, FormField patterns.\n\n\u003C\u002Fgeneric_components>\n\n\u003Cserver_components>\n\nReact 19 Server Components run on server, can be async.\n\n**Async data fetching**:\n\n```typescript\nexport default async function UserPage({ params }: { params: { id: string } }) {\n  const user = await fetchUser(params.id);\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\n**Server Actions** - 'use server' for mutations:\n\n```typescript\n'use server';\n\nexport async function updateUser(userId: string, formData: FormData) {\n  await db.user.update({ where: { id: userId }, data: { ... } });\n  revalidatePath(`\u002Fusers\u002F${userId}`);\n}\n```\n\n**Client + Server Action**:\n\n```typescript\n'use client';\n\nimport { useActionState } from 'react';\nimport { updateUser } from '@\u002Factions\u002Fuser';\n\nfunction UserForm({ userId }: { userId: string }) {\n  const [state, formAction, isPending] = useActionState(\n    (prev, formData) => updateUser(userId, formData), {}\n  );\n  return \u003Cform action={formAction}>...\u003C\u002Fform>;\n}\n```\n\n**use() for promise handoff**:\n\n```typescript\n\u002F\u002F Server: pass promise without await\nasync function Page() {\n  const userPromise = fetchUser('123');\n  return \u003CUserProfile userPromise={userPromise} \u002F>;\n}\n\n\u002F\u002F Client: unwrap with use()\n'use client';\nfunction UserProfile({ userPromise }: { userPromise: Promise\u003CUser> }) {\n  const user = use(userPromise);\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\nSee [server-components.md](examples\u002Fserver-components.md) for parallel fetching, streaming, error boundaries.\n\n\u003C\u002Fserver_components>\n\n\u003Crouting>\n\nBoth TanStack Router and React Router v7 provide type-safe routing solutions.\n\n**TanStack Router** - Compile-time type safety with Zod validation:\n\n```typescript\nimport { createRoute } from '@tanstack\u002Freact-router';\nimport { z } from 'zod';\n\nconst userRoute = createRoute({\n  path: '\u002Fusers\u002F$userId',\n  component: UserPage,\n  loader: async ({ params }) => ({ user: await fetchUser(params.userId) }),\n  validateSearch: z.object({\n    tab: z.enum(['profile', 'settings']).optional(),\n    page: z.number().int().positive().default(1),\n  }),\n});\n\nfunction UserPage() {\n  const { user } = useLoaderData({ from: userRoute.id });\n  const { tab, page } = useSearch({ from: userRoute.id });\n  const { userId } = useParams({ from: userRoute.id });\n}\n```\n\n**React Router v7** - Automatic type generation with Framework Mode:\n\n```typescript\nimport type { Route } from \".\u002F+types\u002Fuser\";\n\nexport async function loader({ params }: Route.LoaderArgs) {\n  return { user: await fetchUser(params.userId) };\n}\n\nexport default function UserPage({ loaderData }: Route.ComponentProps) {\n  const { user } = loaderData; \u002F\u002F Typed from loader\n  return \u003Ch1>{user.name}\u003C\u002Fh1>;\n}\n```\n\nSee [tanstack-router.md](references\u002Ftanstack-router.md) for TanStack patterns and [react-router.md](references\u002Freact-router.md) for React Router patterns.\n\n\u003C\u002Frouting>\n\n\u003Crules>\n\nALWAYS:\n- Specific event types (MouseEvent, ChangeEvent, etc)\n- Explicit useState for unions\u002Fnull\n- ComponentPropsWithoutRef for native element extension\n- Discriminated unions for variant props\n- as const for tuple returns\n- ref as prop in React 19 (no forwardRef)\n- useActionState for form actions\n- Type-safe routing patterns (see routing section)\n\nNEVER:\n- any for event handlers\n- JSX.Element for children (use ReactNode)\n- forwardRef in React 19+\n- useFormState (deprecated)\n- Forget null handling for DOM refs\n- Mix Server\u002FClient components in same file\n- Await promises when passing to use()\n\n\u003C\u002Frules>\n\n\u003Creferences>\n\n- [hooks.md](references\u002Fhooks.md) - useState, useRef, useReducer, useContext, custom hooks\n- [event-handlers.md](references\u002Fevent-handlers.md) - all event types, generic handlers\n- [react-19-patterns.md](references\u002Freact-19-patterns.md) - useActionState, use(), useOptimistic, migration\n- [generic-components.md](examples\u002Fgeneric-components.md) - Table, Select, List, Modal patterns\n- [server-components.md](examples\u002Fserver-components.md) - async components, Server Actions, streaming\n- [tanstack-router.md](references\u002Ftanstack-router.md) - TanStack Router typed routes, search params, navigation\n- [react-router.md](references\u002Freact-router.md) - React Router v7 loaders, actions, type generation, forms\n\n\u003C\u002Freferences>\n","# React TypeScript\n\nType-safe React = compile-time guarantees = confident refactoring.\n\n\u003Cwhen_to_use>\n\n- Building typed React components\n- Implementing generic components\n- Typing event handlers, forms, refs\n- Using React 19 features (Actions, Server Components, use())\n- Router integration (TanStack Router, React Router)\n- Custom hooks with proper typing\n\nNOT for: non-React TypeScript, vanilla JS React\n\n\u003C\u002Fwhen_to_use>\n\n\u003Creact_19_changes>\n\nReact 19 breaking changes require migration. Key patterns:\n\n**ref as prop** - forwardRef deprecated:\n\n```typescript\n\u002F\u002F React 19 - ref as regular prop\ntype ButtonProps = {\n  ref?: React.Ref\u003CHTMLButtonElement>;\n} & React.ComponentPropsWithoutRef\u003C'button'>;\n\nfunction Button({ ref, children, ...props }: ButtonProps) {\n  return \u003Cbutton ref={ref} {...props}>{children}\u003C\u002Fbutton>;\n}\n```\n\n**useActionState** - replaces useFormState:\n\n```typescript\nimport { useActionState } from 'react';\n\ntype FormState = { errors?: string[]; success?: boolean };\n\nfunction Form() {\n  const [state, formAction, isPending] = useActionState(submitAction, {});\n  return \u003Cform action={formAction}>...\u003C\u002Fform>;\n}\n```\n\n**use()** - unwraps promises\u002Fcontext:\n\n```typescript\nfunction UserProfile({ userPromise }: { userPromise: Promise\u003CUser> }) {\n  const user = use(userPromise); \u002F\u002F Suspends until resolved\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\nSee [react-19-patterns.md](references\u002Freact-19-patterns.md) for useOptimistic, useTransition, migration checklist.\n\n\u003C\u002Freact_19_changes>\n\n\u003Ccomponent_patterns>\n\n**Props** - extend native elements:\n\n```typescript\ntype ButtonProps = {\n  variant: 'primary' | 'secondary';\n} & React.ComponentPropsWithoutRef\u003C'button'>;\n\nfunction Button({ variant, children, ...props }: ButtonProps) {\n  return \u003Cbutton className={variant} {...props}>{children}\u003C\u002Fbutton>;\n}\n```\n\n**Children typing**:\n\n```typescript\ntype Props = {\n  children: React.ReactNode;          \u002F\u002F Anything renderable\n  icon: React.ReactElement;           \u002F\u002F Single element\n  render: (data: T) => React.ReactNode;  \u002F\u002F Render prop\n};\n```\n\n**Discriminated unions** for variant props:\n\n```typescript\ntype ButtonProps =\n  | { variant: 'link'; href: string }\n  | { variant: 'button'; onClick: () => void };\n\nfunction Button(props: ButtonProps) {\n  if (props.variant === 'link') {\n    return \u003Ca href={props.href}>Link\u003C\u002Fa>;\n  }\n  return \u003Cbutton onClick={props.onClick}>Button\u003C\u002Fbutton>;\n}\n```\n\n\u003C\u002Fcomponent_patterns>\n\n\u003Cevent_handlers>\n\nUse specific event types for accurate target typing:\n\n```typescript\n\u002F\u002F Mouse\nfunction handleClick(e: React.MouseEvent\u003CHTMLButtonElement>) {\n  e.currentTarget.disabled = true;\n}\n\n\u002F\u002F Form\nfunction handleSubmit(e: React.FormEvent\u003CHTMLFormElement>) {\n  e.preventDefault();\n  const formData = new FormData(e.currentTarget);\n}\n\n\u002F\u002F Input\nfunction handleChange(e: React.ChangeEvent\u003CHTMLInputElement>) {\n  console.log(e.target.value);\n}\n\n\u002F\u002F Keyboard\nfunction handleKeyDown(e: React.KeyboardEvent\u003CHTMLInputElement>) {\n  if (e.key === 'Enter') e.currentTarget.blur();\n}\n```\n\nSee [event-handlers.md](references\u002Fevent-handlers.md) for focus, drag, clipboard, touch, wheel events.\n\n\u003C\u002Fevent_handlers>\n\n\u003Chooks_typing>\n\n**useState** - explicit for unions\u002Fnull:\n\n```typescript\nconst [user, setUser] = useState\u003CUser | null>(null);\nconst [status, setStatus] = useState\u003C'idle' | 'loading'>('idle');\n```\n\n**useRef** - null for DOM, value for mutable:\n\n```typescript\nconst inputRef = useRef\u003CHTMLInputElement>(null);  \u002F\u002F DOM - use ?.\nconst countRef = useRef\u003Cnumber>(0);               \u002F\u002F Mutable - direct access\n```\n\n**useReducer** - discriminated unions for actions:\n\n```typescript\ntype Action =\n  | { type: 'increment' }\n  | { type: 'set'; payload: number };\n\nfunction reducer(state: State, action: Action): State {\n  switch (action.type) {\n    case 'set': return { ...state, count: action.payload };\n    default: return state;\n  }\n}\n```\n\n**Custom hooks** - tuple returns with as const:\n\n```typescript\nfunction useToggle(initial = false) {\n  const [value, setValue] = useState(initial);\n  const toggle = () => setValue(v => !v);\n  return [value, toggle] as const;\n}\n```\n\n**useContext** - null guard pattern:\n\n```typescript\nconst UserContext = createContext\u003CUser | null>(null);\n\nfunction useUser() {\n  const user = useContext(UserContext);\n  if (!user) throw new Error('useUser outside UserProvider');\n  return user;\n}\n```\n\nSee [hooks.md](references\u002Fhooks.md) for useCallback, useMemo, useImperativeHandle, useSyncExternalStore.\n\n\u003C\u002Fhooks_typing>\n\n\u003Cgeneric_components>\n\nGeneric components infer types from props - no manual annotations at call site.\n\n**Pattern** - keyof T for column keys, render props for custom rendering:\n\n```typescript\ntype Column\u003CT> = {\n  key: keyof T;\n  header: string;\n  render?: (value: T[keyof T], item: T) => React.ReactNode;\n};\n\ntype TableProps\u003CT> = {\n  data: T[];\n  columns: Column\u003CT>[];\n  keyExtractor: (item: T) => string | number;\n};\n\nfunction Table\u003CT>({ data, columns, keyExtractor }: TableProps\u003CT>) {\n  return (\n    \u003Ctable>\n      \u003Cthead>\n        \u003Ctr>{columns.map(col => \u003Cth key={String(col.key)}>{col.header}\u003C\u002Fth>)}\u003C\u002Ftr>\n      \u003C\u002Fthead>\n      \u003Ctbody>\n        {data.map(item => (\n          \u003Ctr key={keyExtractor(item)}>\n            {columns.map(col => (\n              \u003Ctd key={String(col.key)}>\n                {col.render ? col.render(item[col.key], item) : String(item[col.key])}\n              \u003C\u002Ftd>\n            ))}\n          \u003C\u002Ftr>\n        ))}\n      \u003C\u002Ftbody>\n    \u003C\u002Ftable>\n  );\n}\n```\n\n**Constrained generics** for required properties:\n\n```typescript\ntype HasId = { id: string | number };\n\nfunction List\u003CT extends HasId>({ items }: { items: T[] }) {\n  return \u003Cul>{items.map(item => \u003Cli key={item.id}>...\u003C\u002Fli>)}\u003C\u002Ful>;\n}\n```\n\nSee [generic-components.md](examples\u002Fgeneric-components.md) for Select, List, Modal, FormField patterns.\n\n\u003C\u002Fgeneric_components>\n\n\u003Cserver_components>\n\nReact 19 Server Components run on server, can be async.\n\n**Async data fetching**:\n\n```typescript\nexport default async function UserPage({ params }: { params: { id: string } }) {\n  const user = await fetchUser(params.id);\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\n**Server Actions** - 'use server' for mutations:\n\n```typescript\n'use server';\n\nexport async function updateUser(userId: string, formData: FormData) {\n  await db.user.update({ where: { id: userId }, data: { ... } });\n  revalidatePath(`\u002Fusers\u002F${userId}`);\n}\n```\n\n**Client + Server Action**:\n\n```typescript\n'use client';\n\nimport { useActionState } from 'react';\nimport { updateUser } from '@\u002Factions\u002Fuser';\n\nfunction UserForm({ userId }: { userId: string }) {\n  const [state, formAction, isPending] = useActionState(\n    (prev, formData) => updateUser(userId, formData), {}\n  );\n  return \u003Cform action={formAction}>...\u003C\u002Fform>;\n}\n```\n\n**use() for promise handoff**:\n\n```typescript\n\u002F\u002F Server: pass promise without await\nasync function Page() {\n  const userPromise = fetchUser('123');\n  return \u003CUserProfile userPromise={userPromise} \u002F>;\n}\n\n\u002F\u002F Client: unwrap with use()\n'use client';\nfunction UserProfile({ userPromise }: { userPromise: Promise\u003CUser> }) {\n  const user = use(userPromise);\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>;\n}\n```\n\nSee [server-components.md](examples\u002Fserver-components.md) for parallel fetching, streaming, error boundaries.\n\n\u003C\u002Fserver_components>\n\n\u003Crouting>\n\nBoth TanStack Router and React Router v7 provide type-safe routing solutions.\n\n**TanStack Router** - Compile-time type safety with Zod validation:\n\n```typescript\nimport { createRoute } from '@tanstack\u002Freact-router';\nimport { z } from 'zod';\n\nconst userRoute = createRoute({\n  path: '\u002Fusers\u002F$userId',\n  component: UserPage,\n  loader: async ({ params }) => ({ user: await fetchUser(params.userId) }),\n  validateSearch: z.object({\n    tab: z.enum(['profile', 'settings']).optional(),\n    page: z.number().int().positive().default(1),\n  }),\n});\n\nfunction UserPage() {\n  const { user } = useLoaderData({ from: userRoute.id });\n  const { tab, page } = useSearch({ from: userRoute.id });\n  const { userId } = useParams({ from: userRoute.id });\n}\n```\n\n**React Router v7** - Automatic type generation with Framework Mode:\n\n```typescript\nimport type { Route } from \".\u002F+types\u002Fuser\";\n\nexport async function loader({ params }: Route.LoaderArgs) {\n  return { user: await fetchUser(params.userId) };\n}\n\nexport default function UserPage({ loaderData }: Route.ComponentProps) {\n  const { user } = loaderData; \u002F\u002F Typed from loader\n  return \u003Ch1>{user.name}\u003C\u002Fh1>;\n}\n```\n\nSee [tanstack-router.md](references\u002Ftanstack-router.md) for TanStack patterns and [react-router.md](references\u002Freact-router.md) for React Router patterns.\n\n\u003C\u002Frouting>\n\n\u003Crules>\n\nALWAYS:\n- Specific event types (MouseEvent, ChangeEvent, etc)\n- Explicit useState for unions\u002Fnull\n- ComponentPropsWithoutRef for native element extension\n- Discriminated unions for variant props\n- as const for tuple returns\n- ref as prop in React 19 (no forwardRef)\n- useActionState for form actions\n- Type-safe routing patterns (see routing section)\n\nNEVER:\n- any for event handlers\n- JSX.Element for children (use ReactNode)\n- forwardRef in React 19+\n- useFormState (deprecated)\n- Forget null handling for DOM refs\n- Mix Server\u002FClient components in same file\n- Await promises when passing to use()\n\n\u003C\u002Frules>\n\n\u003Creferences>\n\n- [hooks.md](references\u002Fhooks.md) - useState, useRef, useReducer, useContext, custom hooks\n- [event-handlers.md](references\u002Fevent-handlers.md) - all event types, generic handlers\n- [react-19-patterns.md](references\u002Freact-19-patterns.md) - useActionState, use(), useOptimistic, migration\n- [generic-components.md](examples\u002Fgeneric-components.md) - Table, Select, List, Modal patterns\n- [server-components.md](examples\u002Fserver-components.md) - async components, Server Actions, streaming\n- [tanstack-router.md](references\u002Ftanstack-router.md) - TanStack Router typed routes, search params, navigation\n- [react-router.md](references\u002Freact-router.md) - React Router v7 loaders, actions, type generation, forms\n\n\u003C\u002Freferences>\n",{"name":5,"version":23,"description":7},"1.0.0","main","d046d088ce5a79a083f0abc0fe1b7ded73bc5b1f","claude-config\u002Fskills\u002Freact-dev","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent","https:\u002F\u002Fgithub.com\u002FSansar35","2026-05-10 16:04:53",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add Sansar35\u002Fclaude-agent --skill react-dev",{"tool":36,"command":37},"bunx","bunx skills add Sansar35\u002Fclaude-agent --skill react-dev",{"tool":39,"command":40},"pnpm","pnpm dlx skills add Sansar35\u002Fclaude-agent --skill react-dev","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002FSKILL.md",true,[44,50,54,58,62,66,70,74,78],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},".skill-source.json","REFERENCE","参考文档",542,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002F.skill-source.json",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"examples\u002Fgeneric-components.md",12902,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Fexamples\u002Fgeneric-components.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"examples\u002Fserver-components.md",13227,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Fexamples\u002Fserver-components.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"README.md",13200,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002FREADME.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fevent-handlers.md",14375,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Freferences\u002Fevent-handlers.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fhooks.md",10977,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Freferences\u002Fhooks.md",{"path":71,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Freact-19-patterns.md",14078,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Freferences\u002Freact-19-patterns.md",{"path":75,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Freact-router.md",20074,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Freferences\u002Freact-router.md",{"path":79,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Ftanstack-router.md",12253,"https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Freact-dev\u002Freferences\u002Ftanstack-router.md",[83,90,97,104,111,119],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M72DVAN1JYEA302MT0C5MGD6","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M72DV8J5NBRRM4RPDFRV95N7","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzod-validation-expert\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":18},"01M72DV5EMHW0BHP9BZ167MDCB","zinc-database","Access ZINC (230M+ purchasable compounds). Search by ZINC ID\u002FSMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzinc-database\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":18},"01M72DV216QY0E693ZPEVQ0DBS","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M72DTXQREMCRKA8NHCVKHN4W","zapier-workflows","Manage and trigger pre-built Zapier workflows and MCP tool orchestration. Use when user mentions workflows, Zaps, automations, daily digest, research, search, lead tracking, expenses, or asks to \"run\" any process. Also handles Perplexity-based research and Google Sheets data tracking.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M72DTT17TBSJ0Y8J2XZ4C9TZ","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-make-patterns\u002FSKILL.md",[],[]]