MCPcopy Index your code
hub / github.com/TanStack/form / Comp

Function Comp

packages/solid-form/tests/createForm.test.tsx:18–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 }
17
18 function Comp() {
19 const form = createForm(() => ({ defaultValues: {} as Person }))
20 return (
21 <>
22 <form.Field
23 name="firstName"
24 defaultValue={''}
25 children={(field) => (
26 <input
27 data-testid="fieldinput"
28 value={field().state.value}
29 onBlur={field().handleBlur}
30 onChange={(e) => field().handleChange(e.currentTarget.value)}
31 />
32 )}
33 />
34 </>
35 )
36 }
37
38 render(() => <Comp />)
39 const input = screen.getByTestId('fieldinput')

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
createFormFunction · 0.50

Tested by

no test coverage detected