export const { useAppForm , … } = creatFormHook({ … }):
function useSetupAppForm(props: FormSetupProps) {
return useAppForm({ ….formOptions, onSubmit, … }) // pass static values for TS inference
}
type AppForm = ReturnType<typeof useSetupAppForm> // <—— is this going to be problematic
function MyForm(props: FormSetupProps) {
Const form = useSetupAppForm(props);
useFormNavigation(form) // <— pass form to a custom hook and avoid cluttering the MyForm
}
export const { useAppForm , … } = creatFormHook({ … }):
function useSetupAppForm(props: FormSetupProps) {
return useAppForm({ ….formOptions, onSubmit, … }) // pass static values for TS inference
}
type AppForm = ReturnType<typeof useSetupAppForm> // <—— is this going to be problematic
function MyForm(props: FormSetupProps) {
Const form = useSetupAppForm(props);
useFormNavigation(form) // <— pass form to a custom hook and avoid cluttering the MyForm
}