23 lines
420 B
TypeScript
23 lines
420 B
TypeScript
import { createFormHook } from '@tanstack/react-form'
|
|
|
|
import {
|
|
Select,
|
|
SubscribeButton,
|
|
TextArea,
|
|
TextField,
|
|
} from '../components/demo.FormComponents'
|
|
import { fieldContext, formContext } from './demo.form-context'
|
|
|
|
export const { useAppForm } = createFormHook({
|
|
fieldComponents: {
|
|
TextField,
|
|
Select,
|
|
TextArea,
|
|
},
|
|
formComponents: {
|
|
SubscribeButton,
|
|
},
|
|
fieldContext,
|
|
formContext,
|
|
})
|