title: Active class for button groups in ReactJs
body: <p>I am trying to figure out how to switch the 'active' class on a a button group on ReactJs. I am trying to avoid the use of JQuery here and trying to figure out how it could be achieved with React. Any help much appreciated. The code:</p>
  
  <pre><code>class TimelineNav extends React.Component {
  
    constructor() {
      super();
      this.state = {};
    }
  
    render() {
      return(
        &lt;div className="TimelineNav"&gt;
          &lt;button href="#" className="allFilter active"&gt;All&lt;/button&gt;
          &lt;button href="#" className="professionalFilter"&gt;Professional&lt;/button&gt;
          &lt;button href="#" className="academicFilter"&gt;Academic&lt;/button&gt;
          &lt;button href="#" className="miscFilter"&gt;Miscellaneous&lt;/button&gt;
        &lt;/div&gt;
      )
    }
  }
  </code></pre>