title: get name and current value from a check box : react js
body: <p>i am trying to get the name (name conatins unique ids from  get api  )and current value of check boxes (DefaultChecked contains values &quot;true or false&quot;)  when i click on the check box</p>
  <pre><code>&lt;td style={styles.gridrow}&gt;
                    {this.state.items.map((itm) =&gt; {
                      return (
                        &lt;&gt;
                          &lt;td&gt;
                            &lt;div&gt;
                              {itm.name}
                              &lt;input
                                name={itm.id}
                                type=&quot;checkbox&quot;
                                DefaultChecked={itm.taken}
                                onChange={this.handleCheckClick}
                              /&gt;
                            &lt;/div&gt;
                          &lt;/td&gt;
                        &lt;/&gt;
                      );
                    })}
                  &lt;/td&gt;
  
  </code></pre>
  <p>when the check box is not checked   and when i click it,  i must get the<code>itm.id</code> and <code>itm.taken</code> as true</p>
  <p>when the check box is   checked   and when i click it,  i must get the<code>itm.id</code> and <code>itm.taken</code> as false</p>