> [event.target.name]: event.target.value
Dumb question but I've never seen this syntax before. What does it do or what is it called? (The brackets)
Dumb question but I've never seen this syntax before. What does it do or what is it called? (The brackets)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Most of the React community has forged forward with ES6/ES2015, so learning that is definitely a part of the process.
var stateUpdate = {}
stateUpdate[event.target.name] = event.target.value;
this.setState=(stateUpdate);
I don't think there was anything necessarily wrong with his tone as he was addressing the tone of the original article.FWIW, this is supported in the newest Chrome as well.