0.0.6 • Published 4 years ago

simplestateform v0.0.6

Weekly downloads
13
License
ISC
Repository
github
Last release
4 years ago

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
        }

    }

}
0.0.6

4 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago