simplestateform
v0.0.6
Published
Library for simple stateful react form components.
Downloads
5
Readme
SimpleStateForm
Library for creating easy simple forms in React.
Basic Usage
import SimpleStateFrom from 'SimpleStateForm'
export default Form {
constructor(props) {
super(props)
this.form = SimpleStateForm({
component: this,
schema: {
email: {
initial: "",
validate: (value) => {
if (value.length === 0) return "Email is required"
}
}
}
})
this.state = {
...this.form.initialValues
}
}
}