Build controlled form without rerender the whole form
npm install --save formo-form
import React, { Component } from 'react'
import { Formo, Form, Field } from 'formo-form';
import MyComponent from 'formo'
import 'formo/dist/index.css'
const initialValue = {
duc: ''
}
class Example extends Component {
render() {
return (
<Formo
initialValue={initialValue}
onSubmit={console.log}
enableReinitialize
>
<Form>
<Field name={'duc'} />
<button type={'submit'}>Submit</button>
<button type={'reset'}>RESET</button>
</Form>
</Formo>
)
}
}
- Support fully API for building and validating form
- Integrate with yup for validation
- Add Unit Test
- Support for react-native
- Optimize performance
MIT © somibuon