react-dev
当使用 TypeScript 构建 React 组件、为 Hook 添加类型、处理事件,或提及 React TypeScript、React 19、服务器组件时,应使用此技能。涵盖 React 18-19 的类型安全模式,包括泛型组件、正确的事件类型以及路由集成(TanStack Router、React Router)。
机器翻译查看英文原文
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).
适用对象:React / Next.js。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- React TypeScript
Type-safe React = compile-time guarantees = confident refactoring. Building typed React components Implementing generic components Typing event handlers, forms, refs Using React 19 features (Actions, Server Components, use()) Router integration (TanStack Router, React Router) Custom hooks with proper typing NOT for: non-React TypeScript, vanilla JS React React 19 breaking changes require migration. Key patterns: ref as prop - forwardRef deprecated: useActionState - replaces useFormState: use() - unwraps promises/context: See react-19-patterns.md for useOptimistic, useTransition, migration checklist. Props - extend native elements: Children typing: Discriminated unions for variant props: Use specific event types for accurate target typing: See event-handlers.md for focus, drag, clipboard, touch, wheel events. useState - explicit for unions/null: useRef - null for DOM, value for mutable: useReducer - discriminated unions for actions: Custom hooks - tuple returns with as const: useContext - null guard pattern: See hooks.md for useCallback, useMemo, useImperativeHandle, useSyncExternalStore. Generic components infer types from props - no manual annotations at call site. Pattern - keyof
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/development/react-dev/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:44.658Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。