Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reactjs get checkbox value

handleChange(e) {
  let isChecked = e.target.checked;
  // do whatever you want with isChecked value
}

render() {
  // ... your code here
  return (
    {/* your other jsx here */}
    <Checkbox otherProps onChange={e => this.handleChange(e)} />
    {/* your other jsx here */}
  );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reactjs #checkbox
ADD COMMENT
Topic
Name
9+3 =