When dealing with events in Javascript, how do you grab the value? ReactJS Interview Question

Pass in the Javascript event (e) and call e.target.value

handleChange(e) {
var title = e.target.value;
this.props.changeTitle(title);
}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.