You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/framework/react/guides/form-composition.md
+63-1Lines changed: 63 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ function App() {
103
103
}
104
104
```
105
105
106
-
This not only allows you to reuse the UI of your shared component, but retains the type-safety you'd expect from TanStack Form: Mistyping `name` will result in a TypeScript error.
106
+
This not only allows you to reuse the UI of your shared component, but retains the type-safety you'd expect from TanStack Form: Mistyping `firstName` will result in a TypeScript error.
107
107
108
108
#### A note on performance
109
109
@@ -160,6 +160,68 @@ function App() {
160
160
}
161
161
```
162
162
163
+
### Extending custom appForm
164
+
165
+
It is quite common for platform teams to ship pre built appForms. It can be exported from a library in a monorepo or as a standalone package on npm.
// Ts will error since the parent appForm already has a component called CustomSubmit
219
+
formComponents: { CustomSubmit },
220
+
})
221
+
```
222
+
223
+
This way you can add extra fields that are unique to your team without bloating the upstream AppForm.
224
+
163
225
## Breaking big forms into smaller pieces
164
226
165
227
Sometimes forms get very large; it's just how it goes sometimes. While TanStack Form supports large forms well, it's never fun to work with hundreds or thousands of lines of code in single files.
0 commit comments