react-nextjs-development
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReact/Next.js Development Workflow
React/Next.js 开发工作流
Overview
概述
Specialized workflow for building React and Next.js 14+ applications with modern patterns including App Router, Server Components, TypeScript, and Tailwind CSS.
针对使用App Router、Server Components、TypeScript和Tailwind CSS等现代模式构建React与Next.js 14+应用的专属工作流。
When to Use This Workflow
适用场景
Use this workflow when:
- Building new React applications
- Creating Next.js 14+ projects with App Router
- Implementing Server Components
- Setting up TypeScript with React
- Styling with Tailwind CSS
- Building full-stack Next.js applications
以下场景可使用本工作流:
- 构建全新React应用
- 创建基于App Router的Next.js 14+项目
- 实现Server Components
- 为React配置TypeScript
- 使用Tailwind CSS进行样式开发
- 构建全栈Next.js应用
Workflow Phases
工作流阶段
Phase 1: Project Setup
阶段1:项目搭建
Skills to Invoke
调用技能
- - Application scaffolding
app-builder - - Full-stack guidance
senior-fullstack - - Next.js 14+ patterns
nextjs-app-router-patterns - - TypeScript setup
typescript-pro
- - 应用脚手架搭建
app-builder - - 全栈开发指导
senior-fullstack - - Next.js 14+模式实践
nextjs-app-router-patterns - - TypeScript配置
typescript-pro
Actions
操作步骤
- Choose project type (React SPA, Next.js app)
- Select build tool (Vite, Next.js, Create React App)
- Scaffold project structure
- Configure TypeScript
- Set up ESLint and Prettier
- 选择项目类型(React单页应用、Next.js应用)
- 选择构建工具(Vite、Next.js、Create React App)
- 搭建项目结构
- 配置TypeScript
- 设置ESLint与Prettier
Copy-Paste Prompts
可复制提示语
Use @app-builder to scaffold a new Next.js 14 project with App RouterUse @nextjs-app-router-patterns to set up Server ComponentsUse @app-builder to scaffold a new Next.js 14 project with App RouterUse @nextjs-app-router-patterns to set up Server ComponentsPhase 2: Component Architecture
阶段2:组件架构
Skills to Invoke
调用技能
- - Component development
frontend-developer - - React patterns
react-patterns - - State management
react-state-management - - UI patterns
react-ui-patterns
- - 组件开发
frontend-developer - - React设计模式
react-patterns - - 状态管理
react-state-management - - UI设计模式
react-ui-patterns
Actions
操作步骤
- Design component hierarchy
- Create base components
- Implement layout components
- Set up state management
- Create custom hooks
- 设计组件层级结构
- 创建基础组件
- 实现布局组件
- 设置状态管理方案
- 编写自定义hooks
Copy-Paste Prompts
可复制提示语
Use @frontend-developer to create reusable React componentsUse @react-patterns to implement proper component compositionUse @react-state-management to set up Zustand storeUse @frontend-developer to create reusable React componentsUse @react-patterns to implement proper component compositionUse @react-state-management to set up Zustand storePhase 3: Styling and Design
阶段3:样式与设计
Skills to Invoke
调用技能
- - UI design
frontend-design - - Tailwind CSS
tailwind-patterns - - Design system
tailwind-design-system - - Component library
core-components
- - UI设计
frontend-design - - Tailwind CSS实践
tailwind-patterns - - 设计系统搭建
tailwind-design-system - - 组件库开发
core-components
Actions
操作步骤
- Set up Tailwind CSS
- Configure design tokens
- Create utility classes
- Build component styles
- Implement responsive design
- 配置Tailwind CSS
- 设置设计令牌
- 创建工具类
- 编写组件样式
- 实现响应式设计
Copy-Paste Prompts
可复制提示语
Use @tailwind-patterns to style components with Tailwind CSS v4Use @frontend-design to create a modern dashboard UIUse @tailwind-patterns to style components with Tailwind CSS v4Use @frontend-design to create a modern dashboard UIPhase 4: Data Fetching
阶段4:数据获取
Skills to Invoke
调用技能
- - Server Components
nextjs-app-router-patterns - - React Query
react-state-management - - API integration
api-patterns
- - Server Components实践
nextjs-app-router-patterns - - React Query应用
react-state-management - - API集成
api-patterns
Actions
操作步骤
- Implement Server Components
- Set up React Query/SWR
- Create API client
- Handle loading states
- Implement error boundaries
- 实现Server Components
- 设置React Query/SWR
- 创建API客户端
- 处理加载状态
- 实现错误边界
Copy-Paste Prompts
可复制提示语
Use @nextjs-app-router-patterns to implement Server Components data fetchingUse @nextjs-app-router-patterns to implement Server Components data fetchingPhase 5: Routing and Navigation
阶段5:路由与导航
Skills to Invoke
调用技能
- - App Router
nextjs-app-router-patterns - - Next.js patterns
nextjs-best-practices
- - App Router实践
nextjs-app-router-patterns - - Next.js最佳实践
nextjs-best-practices
Actions
操作步骤
- Set up file-based routing
- Create dynamic routes
- Implement nested routes
- Add route guards
- Configure redirects
- 设置基于文件的路由
- 创建动态路由
- 实现嵌套路由
- 添加路由守卫
- 配置重定向规则
Copy-Paste Prompts
可复制提示语
Use @nextjs-app-router-patterns to set up parallel routes and intercepting routesUse @nextjs-app-router-patterns to set up parallel routes and intercepting routesPhase 6: Forms and Validation
阶段6:表单与验证
Skills to Invoke
调用技能
- - Form development
frontend-developer - - Type validation
typescript-advanced-types - - Form patterns
react-ui-patterns
- - 表单开发
frontend-developer - - 类型验证
typescript-advanced-types - - 表单设计模式
react-ui-patterns
Actions
操作步骤
- Choose form library (React Hook Form, Formik)
- Set up validation (Zod, Yup)
- Create form components
- Handle submissions
- Implement error handling
- 选择表单库(React Hook Form、Formik)
- 设置验证方案(Zod、Yup)
- 创建表单组件
- 处理表单提交
- 实现错误处理
Copy-Paste Prompts
可复制提示语
Use @frontend-developer to create forms with React Hook Form and ZodUse @frontend-developer to create forms with React Hook Form and ZodPhase 7: Testing
阶段7:测试
Skills to Invoke
调用技能
- - Jest/Vitest
javascript-testing-patterns - - E2E testing
playwright-skill - - E2E patterns
e2e-testing-patterns
- - Jest/Vitest测试
javascript-testing-patterns - - 端到端测试
playwright-skill - - 端到端测试模式
e2e-testing-patterns
Actions
操作步骤
- Set up testing framework
- Write unit tests
- Create component tests
- Implement E2E tests
- Configure CI integration
- 配置测试框架
- 编写单元测试
- 创建组件测试
- 实现端到端测试
- 配置CI集成
Copy-Paste Prompts
可复制提示语
Use @javascript-testing-patterns to write Vitest testsUse @playwright-skill to create E2E tests for critical flowsUse @javascript-testing-patterns to write Vitest testsUse @playwright-skill to create E2E tests for critical flowsPhase 8: Build and Deployment
阶段8:构建与部署
Skills to Invoke
调用技能
- - Vercel deployment
vercel-deployment - - Vercel deployment
vercel-deploy-claimable - - Performance
web-performance-optimization
- - Vercel部署
vercel-deployment - - Vercel部署
vercel-deploy-claimable - - 性能优化
web-performance-optimization
Actions
操作步骤
- Configure build settings
- Optimize bundle size
- Set up environment variables
- Deploy to Vercel
- Configure preview deployments
- 配置构建设置
- 优化包体积
- 设置环境变量
- 部署至Vercel
- 配置预览部署
Copy-Paste Prompts
可复制提示语
Use @vercel-deployment to deploy Next.js app to productionUse @vercel-deployment to deploy Next.js app to productionTechnology Stack
技术栈
| Category | Technology |
|---|---|
| Framework | Next.js 14+, React 18+ |
| Language | TypeScript 5+ |
| Styling | Tailwind CSS v4 |
| State | Zustand, React Query |
| Forms | React Hook Form, Zod |
| Testing | Vitest, Playwright |
| Deployment | Vercel |
| 分类 | 技术 |
|---|---|
| 框架 | Next.js 14+, React 18+ |
| 语言 | TypeScript 5+ |
| 样式 | Tailwind CSS v4 |
| 状态管理 | Zustand, React Query |
| 表单 | React Hook Form, Zod |
| 测试 | Vitest, Playwright |
| 部署 | Vercel |
Quality Gates
质量检查项
- TypeScript compiles without errors
- All tests passing
- Linting clean
- Performance metrics met (LCP, CLS, FID)
- Accessibility checked (WCAG 2.1)
- Responsive design verified
- TypeScript编译无错误
- 所有测试通过
- 代码检查无问题
- 性能指标达标(LCP、CLS、FID)
- 可访问性合规(WCAG 2.1)
- 响应式设计验证通过
Related Workflow Bundles
相关工作流包
- - General development
development - - Testing workflow
testing-qa - - Documentation
documentation - - TypeScript patterns
typescript-development
- - 通用开发工作流
development - - 测试工作流
testing-qa - - 文档工作流
documentation - - TypeScript模式工作流
typescript-development
Limitations
局限性
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
- 仅当任务完全匹配上述描述范围时使用本技能。
- 输出内容不可替代环境特定的验证、测试或专家评审。
- 若缺少必要输入、权限、安全边界或成功标准,请暂停操作并请求澄清。