Managing FORMS in React is a Complex Process

  1. Getting values in and out of form state
  2. Validation and error messages
  3. Handling form submission

React Form Libraries

★ star

16,757

Why Formik?

Declarative

Intuitive

Adoptable

It takes care of the repetitive  stuff like updating values, errors, visited fields, validation and form submission

No fancy subscriptions or observables under the hood, just plain React state and props.

Formik does not use external state management libraries like Redux or MobX.

Also works with React Native.

Installation

$ npm i -S formik

Validation

You can write your own validation or use third party library.

I like to use Yup (Formik preferred)

$ npm i -S yup

That's the basic of Formik.

To know more please visit

https://jaredpalmer.com/formik/

Any question?

Manage Form with Formik in React

By Tarun Sharma

Manage Form with Formik in React

  • 451