title: How to hide and show list contents: ReactJS
body: <p>I have a list of items, if an item is clicked it shall show its content. Do I need for each list item a <code>boolean</code> in the state object or can I do it with add and remove <code>classname</code> like in <code>jquery</code>?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code> &lt;ul&gt;
    &lt;li&gt; item &lt;div className="hidden"&gt; some extra text ... &lt;/div&gt; &lt;/li&gt;
    &lt;li&gt; item &lt;div className="hidden"&gt; some extra text ... &lt;/div&gt; &lt;/li&gt;
    &lt;li&gt; item &lt;div className="hidden"&gt; some extra text ... &lt;/div&gt; &lt;/li&gt;
    &lt;li&gt; item &lt;div className="hidden"&gt; some extra text ... &lt;/div&gt; &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>