import TestCase from '../../TestCase'; import HoverBox from './hover-box'; const React = window.React; class Hover extends React.Component { state = { overs: 0, outs: 0, enters: 0, leaves: 0, }; onOver = () => this.setState({overs: this.state.overs + 1}); onOut = () => this.setState({outs: this.state.outs + 1}); onEnter = () => this.setState({enters: this.state.enters + 1}); onLeave = () => this.setState({leaves: this.state.leaves + 1}); render() { const {overs, outs, enters, leaves} = this.state; return (
  • Hover over the above box and the obstacles
  • Overs and outs should increase when moving over the obstacles but enters and leaves should not.

    Pointer Overs: {overs}
    Pointer Outs: {outs}
    Pointer Enters: {enters}
    Pointer Leaves: {leaves}

    ); } } export default Hover;