You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to set state with a dynamic key name? in REACT

Practice



If you are using ES6 or the Babel transpiler to transform your JSX code, you can do this with computed property names .

handleInputChange(event) {
  this.setState({ [event.target.id]: event.target.value })
}

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Scripting client side JavaScript, jqvery, BackBone"

Terms: Scripting client side JavaScript, jqvery, BackBone