title: Handling react events
body: <p>We're creating a new site and we chose reactjs to do this. And right now I'm researching on events in Javascript and luckily I stumbled on this site where he teaches <a href="http://www.kirupa.com/html5/handling_events_for_many_elements.htm" rel="nofollow noreferrer">how to handle events for many elements</a> and letting the parent handle the event and basically is what we are doing for out site as well right now.</p>
  <p>As I continued to research, I also stumbled upon this <a href="https://stackoverflow.com/questions/22639534/pass-props-to-parent-component-in-react-js/24356104#24356104">answer here</a> (more react oriented) where it says I would pass the function/method from the parent to the child.</p>
  <p>Is it promoting the same way as what was mentioned on the first link? Also, is this the way to do this (like the first link to handle events) in reactjs? Should I implement somewhere along this lines?</p>
  <p>Follow up question... or should I ask this separately?</p>
  <p>If I have</p>
  <pre><code>&lt;Parent&gt;
    &lt;ChildComponent&gt;
    &lt;ChildComponent&gt;
    ...
  </code></pre>
  <p>and a child when clicked I add a class to it, say <code>.selected</code>. But I'd need to remove it to the others since they are not selected anymore. In jQuery I could've done something like</p>
  <pre><code>$('.child-components').removeClass('selected');
  $(this).addClass('selected');
  </code></pre>
  <p>How to do this the react way?</p>