T
TanStack9mo ago
rival-black

createFormHook Usage

Is createFormHook meant to be used as a global hook for multiple forms? I don't quite understand how to scale the Form Composition example. Should I create a single hook with all possible form and field components used in the app even if some forms don't use all of the form/field components?
3 Replies
rival-black
rival-blackOP9mo ago
Edit: My use case is creating a UI component and form library to use in multiple projects. Would I just use lazy imports for each of the field/form components I plan to use?
absent-sapphire
absent-sapphire9mo ago
Yes, createFormHook is intended to be made once for a whole codebase With React.lazy providing lazy loading if needed
rival-black
rival-blackOP9mo ago
Thank you

Did you find this page helpful?