ReactJs adding active class to button
<p>I have five buttons, dynamically created. My target is: when any button is clicked to add active class to it, and of course if any other has that active class to remove it. How can I achieve that?</p>

<pre><code>&lt;div&gt;
    {buttons.map(function (name, index) {
        return &lt;input type="button" value={name} onClick={someFunct} key={ name }/&gt;;
   })}
&lt;/div&gt;
</code></pre>