“cara menginstal formik di react native” Kode Jawaban

cara menginstal formik di react native

****** REACT-NATIVE *****

// how to install formik(latest version) in react native
npm i formik

// how to install formik (specific version) in react native
npm i [email protected]
Copy Paster

Formik bereaksi asli

// Formik x React Native example
2 import React from 'react';
3 import { Button, TextInput, View } from 'react-native';
4 import { Formik } from 'formik';
5 
6 export const MyReactNativeForm = props => (
7   <Formik
8     initialValues={{ email: '' }}
9     onSubmit={values => console.log(values)}
10   >
11     {({ handleChange, handleBlur, handleSubmit, values }) => (
12       <View>
13         <TextInput
14           onChangeText={handleChange('email')}
15           onBlur={handleBlur('email')}
16           value={values.email}
17         />
18         <Button onPress={handleSubmit} title="Submit" />
19       </View>
20     )}
21   </Formik>
22 );
Hakim Katende

Jawaban yang mirip dengan “cara menginstal formik di react native”

Pertanyaan yang mirip dengan “cara menginstal formik di react native”

Lebih banyak jawaban terkait untuk “cara menginstal formik di react native” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya