Open History to see the last commit
1---
2id: react-native
3title: Usage with React Native
4---
5β
6TanStack Form is headless and it should support React Native out-of-the-box without needing any additional configuration.
7β
8Here is an example:
9β
10```tsx
11<form.Field
12 name="age"
13 validators={{
14 onChange: (val) =>
15 val < 13 ? 'You must be 13 to make an account' : undefined,
16 }}
17>
18 {(field) => (
19 <>
20 <Text>Age:</Text>
21 <TextInput value={field.state.value} onChangeText={field.handleChange} />
22 {!field.state.meta.isValid && (
23 <Text>{field.state.meta.errors.join(', ')}</Text>
24 )}
25 </>
26 )}
27</form.Field>
28```