๐Ÿ“ฆ nrjdalal / tanstack-start

๐Ÿ“„ demo.form.ts ยท 18 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18import { 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,
})