Closed msimonc closed 5 years ago
I am not sure I understand the issue. Can you show me the code?
Sorry slow to reply, busy at work! It works if I do:
render() { if (!this.state.dataHasLoaded) { return null; }...
Seems your library only renders the first time my render renders it.
You can set the values using the initialValues
prop and if you need to change the values multiple times then you can use enableReinitialize
prop provided by formik.
If this doesn't work, please upload your component code, so that I can check what's wrong.
A basic form renders from this.state,
the api call returns with data and Json is constructed and saved to this.state
The component renders again, but the new form isn't displayed until I click on the (still displayed) basic form.
What do I do to trigger a re-render?