score:1

Accepted answer

i see that you are mutating the state directly by using

let formvalues = this.state.formvalues; 
formvalues[name] = value; 

one way to alleviate this issue is to spread the formvalues before assigning

let formvalues = {...this.state.formvalues}; 

or you can use immer


Related Query

More Query from same tag