title: this.setState is not re rendering button icon
body: <p>I am trying to change the class of my button to diplay like/dislike icons however, even when the state is changing when observed from the chrome dev tool the icon doesn't seem to be changing.</p>
  
  <pre><code>    import React, { Component } from "react";
      import { connect } from "react-redux";
      import classnames from "classnames";
      import { addLikeToPost } from "../../../actions/postActions";
      import TextFieldGroup from "../../common/TextFieldGroup";
  
      class Postpanel extends Component {
        constructor(props) {
          super(props);
          this.state = {
            isliked: this.props.post.isLiked
          };
        }
  
        toggleBox = () =&gt; {
          this.props.toggleCommentBox(this.props.index);
        };
  
        addLike = () =&gt; {
          this.props.addLikeToPost(this.props.post._id);
          this.setState(prevState =&gt; ({
            isliked: !prevState.isliked
          }));
        };
  
        render() {
          const likeIcon = this.state.isliked == true ? "fa fa-thumbs-up" : "fa fa-heart";
  
          return (
            &lt;div className="card mb-4 hidden-md-down"&gt;
              &lt;div className="card-footer"&gt;
                &lt;div className="row"&gt;
                  &lt;div className="col-xs-6 col-sm-6 col-md-6"&gt;
                    &lt;div className="text-center"&gt;
                      &lt;button className="btn btn-pill btn-secondary" onClick={this.addLike}&gt;
                        &lt;i className={likeIcon} /&gt; Like
                      &lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div className="col-xs-6 col-sm-6 col-md-6"&gt;
                    &lt;div className="text-center"&gt;
                      &lt;button className="btn btn-pill btn-secondary" onClick={this.toggleBox} type="button"&gt;
                        &lt;i className="fa fa-comment-o" aria-hidden="true" /&gt; Comment
                      &lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          );
        }
      }
  
      const mapStateToProps = state =&gt; ({
        auth: state.auth,
        errors: state.errors
      });
  
      export default connect(
        mapStateToProps,
        { addLikeToPost }
      )(Postpanel);
  </code></pre>
  
  <p>I am trying to change the button icon with the likeIcon const.</p>
  
  <p>edit: After digging in, i found the issue. I had a fontawesome js file that was messing with the rendering. All of the solutions posted here are correct.</p>