Replies: 3 comments
-
See this recent issue about the same topic. It doesn't look like this feature will be implemented anytime soon. This comment is the best workaround I've found. |
Beta Was this translation helpful? Give feedback.
-
@BrendanC23 Do you know of form libraries that support this level of abstraction? It's quite essential for me to keep my codebase maintainable. |
Beta Was this translation helpful? Give feedback.
-
I don't have any other suggestions, sorry. From what I've read of other libraries, RHF is the simplest to use and most performant, so I've tried to find workarounds for RHF. I'm not sure what other libraries have better support for reusable forms. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
foo
andbar
foo
andbar
into its own component which can be reused for all 10 formsDescribe the solution you'd like
A clear and concise description of what you want to happen.
foo
andbar
+ any additional fields.Additional context
Add any other context or screenshots about the feature request here.
I have tried implementing this using a generic
UseFormReturn
but typescript complains thatArgument of type '"foo"' is not assignable to parameter of type 'Path<T>'.
https://stackblitz.com/edit/stackblitz-starters-pfcy87?file=app%2Fpage.tsx&view=editor
Beta Was this translation helpful? Give feedback.
All reactions