title: Set React component state from outside of component
body: <p>I have a list of components and want to set each component as selected when the user clicks on it.</p>
  
  <p>The flow looks like</p>
  
  <pre><code>Dashboard
   ⎿ MyList
      ⎿ MyItem -&gt; onClick -&gt; setState({active:true})
  </code></pre>
  
  <p>I've got the selected part done by using state but I'm left wondering how to deactivate all the other elements.</p>