title: React JS toggle/ adding a class on hover
body: <p>I'm using the animate.css library with React and trying to set up a element (button) to pulse when hovered over. Tried to look through the docs and here but can't find a way to achieve this simple task. If anyone has achieved this or found a reference would greatly be appreciated.</p>
  
  <pre><code>class App extends Component {
  
     constructor(props) {
      super(props);
  
      this.handleHover = this.handleHover.bind(this);
    }
  
    handleHover(){
      this.setState({
          isHovered: !this.state.isHovered
      });
    }
  
    render() {
      const btnClass = this.state.isHovered ? "pulse animated" : "";
  
      return (
        &lt;div&gt;
          &lt;button className={btnClass} onMouseEnter={this.state.handleHover} onMouseLeave={this.state.handleHover}&gt;Test&lt;/button&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default App;
  </code></pre>