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.
这是一套专门用于构建React和Next.js 14+应用的工作流,采用App Router、Server Components、TypeScript和Tailwind CSS等现代模式。
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
第一阶段:项目搭建
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
第二阶段:组件架构
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
第三阶段:样式与设计
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
第四阶段:数据获取
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
第五阶段:路由与导航
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
第六阶段:表单与验证
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
第七阶段:测试
Skills to Invoke
可调用技能
- - Jest/Vitest
javascript-testing-patterns - - E2E testing
playwright-skill - - E2E patterns
e2e-testing-patterns
- - Jest/Vitest使用
javascript-testing-patterns - - E2E测试
playwright-skill - - E2E模式实践
e2e-testing-patterns
Actions
操作步骤
- Set up testing framework
- Write unit tests
- Create component tests
- Implement E2E tests
- Configure CI integration
- 搭建测试框架
- 编写单元测试
- 创建组件测试
- 实现E2E测试
- 配置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
第八阶段:构建与部署
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