Question about how to have components with multiple fields in them
Hello, i'm upgrading to v1, and in my App I have components that used to take a typed form as a prop, and then have many form.Field children, where the name field would be inferred.
Is there anyway to have something similar in the new API, or what would be the next best thing ?
3 Replies
fair-roseOP•4w ago
I think withForm is what I was looking for, guess I'm good then
extended-salmon•4w ago
depends on what you need.
One form split across multiple components =>
withForm
Multiple forms share a section of fields => withFieldGroupfair-roseOP•4w ago
Our logic is designed so that the form declaration lives far away from the actual ui, and you can plug many different uis for the same form.
This worked great with generics, but using withForm it seems like it will be trouble to adapt this kind of logic, i'm really not a fan of having "default values as typing".
Though to each their own I guess, I don't think tanstack form is a match for our needs so we will migrate out.
Thanks still