用途:辅助 React + Next.js(App Router)应用开发,处理 .tsx/.jsx 文件、next.config 配置,以及 Server Components、数据获取与状态管理相关任务。
主要能力:提供 Server Component、Client Component、Server Action 的模式;数据获取、状态管理、表单、测试与样式相关实践;项目结构建议(按功能而非技术层组织,如 app、components/ui、features、lib、stores、types)。状态方案包括 TanStack Query(服务端状态)、Zustand(全局客户端状态)、nuqs(URL 状态);表单采用 Server Action + useActionState + Zod,配合 useFormStatus 处理 pending UI;性能上使用 next/image 加 priority、dynamic() 懒加载与 React Compiler;测试使用 Vitest + React Testing Library(单元)与 Playwright(E2E)。默认使用 Server Component,仅在需要 onClick/onChange、useState/useEffect、浏览器 API 等场景使用 Client Component。
使用方式:常用命令为 npm run dev && npm run build && npm run test && npm run typecheck。提交前必须通过 make check && make test-e2e;make check 在 Next.js 应用中展开为 npm run lint、npm run typecheck(tsc --noEmit)、npm run test、npm run build、npm audit --omit=dev。版本需实际确认而非假设,可查看 package.json 中 react/next 依赖、.nvmrc、node -v,以及 npm view react version 与 npm view next version。
限制:资料未提供该技能的具体安装步骤、收费方式与适用范围细节,暂未提供。