Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

moxon6/formik-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

formik-simple

This is a very small wrapper around the formik HOC to make usage a little simpler.

Usage

Allows for usage in the following manner:

<Component {...form.$('fieldA')} />

Or for nested properties:

<Component {...form.$('fieldB.subFieldC')} />

With values in the shape

{
    fieldA: 'fieldAValue',
    fieldB:{
        subFieldC: 'subFieldCValue'
    }
}

Errors (from yup validation) are also passed as props to the field components

See also

https://github.com/jaredpalmer/formik for withFormik API

Field pattern form.$ based on https://github.com/foxhound87/mobx-react-form

About

Thin wrapper for Formik 'withForm' HOC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published