constructor(){
super();
this.state = {
isHovered: false
};
this.handleHover = this.handleHover.bind(this);
}
handleHover(){
this.setState(prevState => ({
isHovered: !prevState.isHovered
}));
}
render(){
const btnClass = this.state.isHovered ? "pulse" : "";
return (
<div className="РОДИТЕЛЬ"></div>
<div className={btnClass} onMouseEnter={this.handleHover} onMouseLeave={this.handleHover}></div>
)
}