Skip to content

Instantly share code, notes, and snippets.

@lucas-lm
Created March 7, 2020 01:15
Show Gist options
  • Save lucas-lm/dba8fb1e4a3ccd5a3dfd253ce1bfc451 to your computer and use it in GitHub Desktop.
Save lucas-lm/dba8fb1e4a3ccd5a3dfd253ce1bfc451 to your computer and use it in GitHub Desktop.
Form component for React with formik
import React from 'react'
import { Formik, Form } from 'formik'
const FormComponent = props => {
const { children, className, ...rest } = props
return (
<Formik
{...rest}
>
<Form className={className}>
{children}
</Form>
</Formik>
)
}
export default FormComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment