title: Change component's props onClick
body: <p>I'm new to react and trying to achieve something but don't know how to get it working. here is my code:</p>
  
  <pre><code>import React from "react";
  import CheckBox from "./CheckBox";
  
  class MainContainer extends React.Component {
      constructor(props) {
      super(props);
      this.state = {};
      this.onSelect= this.onSelect.bind(this);
      };
      onSelect(selected) {
       //change props only for the clicked checkbox and update state
      }
      render(){
       return (&lt;div&gt; 
                 &lt;CheckBox 
                  label="Label"
                  count="60"
                  stateGroup="department"
                  ticked={false}
                  onClick = {this.onSelect}
                /&gt;
                 &lt;CheckBox 
                  label="Label"
                  count="60"
                  stateGroup="language"
                  ticked={false}
                  onClick = {this.onSelect}
                /&gt;
              &lt;/div&gt;)
    }
  
  }
  </code></pre>
  
  <p>So, I have container "MainContainer" with "CheckBox" components inside and I want to keep my state in one place the "MainContainer" state. what I'm trying to do is onSelect I'd update the state as well as change the props for only the selected component but I don't know how to access that component inside the onSelect function. and I don't if I can directly change the props for a component in the first place.</p>
  
  <p>Thank you.</p>