Matching on custom types
I have an array of errors (typed as
P.S.
any[]) that I need to transform. I’d like to break the transformation into several match cases. I’ve already done this with the Fluent API, but I’m not sure if the same approach works with the string-based API.P.S.
- I'd appreciate any guidence if there is a better solution than a match here or if i could make
field.state.meta.errorsinTanstack Formmore type-safe when using theuseFieldContext. Probably what I should do instead is just transform the errors into strings at the form level and pass it to a pure component. - Thanks for this library! It's one of greatest things I've came across on my recent journey into the TypeScript land.