I have a form which loads with default values.
I want a button to reset all form's values to empty values.
The built in handleReset function only resets the values to the default values that the form was loaded with. I tried to change the props with default values with concept similar to the code below, but the props are "read only".
resetToEmpty(){
this.props.user = {};
}
<button type="button" onClick={ resetToEmpty}>Clear form demo data</button>
Code sand box https://x7069jq8lz.codesandbox.io/
How could reset all formIk fields to empty values?
Thanks!