Loading...
Loading...
Compare original and translation side by side
TeamCreateTeamCreate| Feature | Benefit |
|---|---|
| Signal-based state | Minimal re-renders, optimal performance |
| Full TypeScript | DeepKeys, DeepValue inference |
| Server Actions native | Built-in Next.js 16 integration |
| Zod adapter | Schema-first validation |
| Framework agnostic | Same API for React, Vue, Solid |
| Headless | Works with any UI library (shadcn/ui) |
| 特性 | 优势 |
|---|---|
| 基于信号的状态管理 | 最少重渲染,最优性能 |
| 完整TypeScript支持 | DeepKeys、DeepValue类型推断 |
| 原生支持Server Actions | 内置Next.js 16集成 |
| Zod适配器 | 基于Schema的优先验证 |
| 框架无关 | React、Vue、Solid使用相同API |
| 无头组件 | 可与任意UI库(如shadcn/ui)配合使用 |
onServerValidatemodules/[feature]/src/components/forms/onServerValidatemodules/[feature]/src/components/forms/modules/auth/src/components/forms/modules/auth/src/interfaces/modules/auth/src/actions/modules/cores/lib/forms/modules/auth/src/components/forms/modules/auth/src/interfaces/modules/auth/src/actions/modules/cores/lib/forms/| File | Purpose | Max Lines |
|---|---|---|
| Shared formOptions + Zod schema | 50 |
| Client form UI with fields | 80 |
| Server Action with validation | 30 |
| Types for form values | 30 |
| 文件 | 用途 | 最大行数 |
|---|---|---|
| 共享formOptions + Zod Schema | 50 |
| 包含字段的客户端表单UI | 80 |
| 带验证的Server Action | 30 |
| 表单值的类型定义 | 30 |
field.state.meta.errorsform.state.errorMapfield.state.meta.errorsform.state.errorMap| Need | Reference |
|---|---|
| Initial setup | installation.md |
| Basic patterns | basic-usage.md, field-api.md |
| Validation | validation-zod.md, async-validation.md |
| Server Actions | server-actions.md |
| Dynamic forms | array-fields.md, multi-step-form.md |
| UI integration | shadcn-integration.md |
| TypeScript | typescript.md |
| Migration | migration-rhf.md |
| 需求 | 参考文档 |
|---|---|
| 初始设置 | installation.md |
| 基础模式 | basic-usage.md, field-api.md |
| 验证 | validation-zod.md, async-validation.md |
| Server Actions | server-actions.md |
| 动态表单 | array-fields.md, multi-step-form.md |
| UI集成 | shadcn-integration.md |
| TypeScript | typescript.md |
| 迁移 | migration-rhf.md |
asyncDebounceMsmergeFormasyncDebounceMsmergeForm| Aspect | TanStack Form | React Hook Form |
|---|---|---|
| Type Safety | 100% (DeepKeys) | Manual typing |
| Performance | Signals (minimal) | Refs (good) |
| Server Actions | Native support | Manual integration |
| Bundle Size | ~12KB | ~9KB |
| Learning Curve | Medium | Low |
| Use Case | Complex apps | Standard forms |
| 维度 | TanStack Form | React Hook Form |
|---|---|---|
| 类型安全 | 100%(DeepKeys) | 手动类型定义 |
| 性能 | 基于信号(重渲染极少) | 基于Ref(良好) |
| Server Actions支持 | 原生支持 | 手动集成 |
| 包体积 | ~12KB | ~9KB |
| 学习曲线 | 中等 | 低 |
| 适用场景 | 复杂应用 | 标准表单 |