Formik: Asynchronous initialValues

Created on 12 Feb 2018  路  2Comments  路  Source: formium/formik

Bug, Feature, or Question?

Hello,

I don't know if you have implemented this function but I don't see it on the doc and I make test but it doesn't work

it's possible to have asynchronous initialvalues?

demo here: https://codesandbox.io/s/ryqxlx7xvn

when i click on setdata for initialize the data

Thanks for your answer

Most helpful comment

You don't need Formik for this. Just use React!

https://codesandbox.io/s/j2kq8pnv2w

All 2 comments

You don't need Formik for this. Just use React!

https://codesandbox.io/s/j2kq8pnv2w

I have a form with formik, the data are of the api, o initialValues not working in with Asynchronous, the component is render before finish fetch. some possible solution to the problem

Was this page helpful?
0 / 5 - 0 ratings