javascript [event] square brackets code example
Example: react event target square brackets
handleChange(event) {
+ this.setState({
+ [event.target.name]: event.target.value
+ })
+ }
handleChange(event) {
+ this.setState({
+ [event.target.name]: event.target.value
+ })
+ }