title: Can I use FieldArray alongside useFormik hook?
body: <p>In my form component, I want to use FieldArray with useFormik hook. When I try to do that I get <code>TypeError: _this$props2$formik is undefined</code> error.</p>
  
  <p>Should I switch to class component or can I somehow inject formik to FieldArray? Or is there a way to do that?</p>
  
  <pre class="lang-js prettyprint-override"><code>const MyForm = ({openPanel}) =&gt; {
      const intl = useIntl();
  
      const formData = useSelector(state =&gt; state.form[Forms.SOURCE_EDIT]);
  
      const formik = useFormik({
          initialValues: {
              style: formData ? formData.style : '',
              layers: formData ? formData.layers : [],
          },
          validationSchema: createValidationSchema(),
          onSubmit: async values =&gt; {
              // ...
          },
      });
  
      const {
          values,
          errors,
          touched,
          handleSubmit,
          isSubmitting,
          handleChange,
          handleBlur,
      } = formik;
  
      return (
          &lt;div className={'center-flex'}&gt;
              &lt;form onSubmit={handleSubmit}&gt;
                  {/* ... */}
                  &lt;FieldArray
                      name={'layers'}
                      render={arrayHelpers =&gt; (
                          &lt;div&gt;
                              {values.layers.map((layer, index) =&gt; (
                                  &lt;div key={index}&gt;{layer.name}&lt;/div&gt;
                              ))}
                          &lt;/div&gt;
                      )}
                  /&gt;
                  &lt;Button
                      large
                      intent={Intent.PRIMARY}
                      fill
                      loading={isSubmitting}
                      disabled={isSubmitting}
                      type={'submit'}&gt;
                      {intl.formatMessage(messages.next)}
                  &lt;/Button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      );
  };
  
  </code></pre>
  
  <p>Thanks in advance</p>