title: How to highlight selected button in React?
body: <p>The following react component has four buttons, created using the data extracted from the props sent by the parent component. You can find the entire project here -> <a href="https://github.com/rajendrashenoy/myresume-react-app" rel="nofollow noreferrer">https://github.com/rajendrashenoy/myresume-react-app</a></p>
  
  <p>The application can be accessed through -> <a href="https://rajendrashenoy.github.io/myresume-react-app/" rel="nofollow noreferrer">https://rajendrashenoy.github.io/myresume-react-app/</a></p>
  
  <p>When any button is clicked, it returns the id of the button clicked to the parent component. My question is, how can I highlight the clicked button?</p>
  
  <pre><code>import React, { Component } from 'react';
  
  
  class ResumeTypes extends Component {
  
    constructor(props) {
      super(props);
      //this.handleChange = this.handleChange.bind(this);
    }   
  
    render() {
  
  
    return this.props.resumetypes.map((resumetype, selectedtype) =&gt; (
         &lt;input type="button" style={{width: '25%', border: "none"}} id={resumetype.id} key={resumetype.id} value={ resumetype.type} onClick={this.props.selectedtype.bind(this, resumetype.id)}/&gt;        
  
      ));
  
    }
  }
  </code></pre>