Manpreet Oberoi Manpreet Oberoi - 1 year ago 160
React JSX Question

retrieving value of checkbox in react.js

I am quite new to react.js and i want to retrieve value of my checkbox, when it is checked. ... can somebody guide me how to retrieve value of checkbox, when it is checked.

I am using this "".
my code looks like this.

<div className="user_box">
{ , i)=>{

return <Checkbox
name = "checkbox"


my function


//var all_users = [];
//var value = this.checkbox.value;

console.log('checkbox checked:', (;


still not getting how to retrieve value of it...

please guide me, if you guys some better idea also. thanks

Answer Source

you need to pass the "e, Synthetic event parameter to your handler" :

handleChange(e) {
  let isChecked =;
  // 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 */}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download