When try to insert, remove or push
If tryied on codesandbox, nothing happens.
if tried on vscode, throws an error, check the print:

To handle correctly the array helpers.
https://codesandbox.io/s/kxlowwpn8r
Formik 2.0 with hooks
| Software | Version(s) |
| ---------------- | ---------- |
| Formik | 2.0 and ^2.0.1-alpha.2
| React | 16.8.6
| TypeScript |3.4.5
| Browser | Google chrome 74
| npm/Yarn | 1.15.2
| Operating System | Manjaro
The issue is still present in the latest RC.
The codepen isn't working but i think that the problem is because its not provided a context of formik to FieldArray to access the helpers from formik.
import { useFormik, FormikProvider } from 'formik'
const TestForm = () => {
const formikbag = useFormik({
initialValues: { name: '' },
onSubmit: values => console.log(values),
})
return (
<FormikProvider value=(formikbag)>
{/* Fields and FieldArrays */}
</FormikProvider>
)
}
export default TestForm
OBS: The
Most helpful comment
The codepen isn't working but i think that the problem is because its not provided a context of formik to FieldArray to access the helpers from formik.
OBS: The component uses the useFormik hook and the FormikProvider to provide the helpers to components like FieldArray (abstract the logic to simplify the usage).