useFormik() is a custom React hook that will return all Formik state and helpers directly. Despite its name, it is not meant for the majority of use cases. Internally, Formik uses
useFormik to create the
<Formik> component (which renders a React Context Provider). If you are trying to access Formik state via context, use useFormikContext. Only use this hook if you are NOT using
** Be aware that
<FieldArray> will NOT work with
useFormik() as they all require React Context.
<Formik>for your own consumption
A custom React Hook that returns Formik states and helpers. It is used internally to create the
<Formik> component, but is exported for advanced use cases or for those people that do not want to use React Context.