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
optimistic-goldOP•6mo 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?
optimistic-gold•6mo ago
Yes, createFormHook is intended to be made once for a whole codebase
With React.lazy providing lazy loading if needed
optimistic-goldOP•6mo ago
Thank you