Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I do not see the point in such a record, it is enough to write
this.setState({
[e.target.name]: e.target.value
})
This may be needed in applications where the state transition is actively used (For example, using Ctrl + Z, but such an entry is optional, SetState() will copy all the fields of the previous state to the new one)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question