How I can trigger the onClick and onHover CSS animations for the bellow ReactJS button component?
I've tried using ref = {input => (this.inputElement = input)}, but only clicked the button, no animation.
<td>
{this.state.buttons.slice(0, 4).map(btn => (
<button
onClick={() => this.handleClick(btn)}
key={btn}
className={this.getBadgeClasses(btn)}
>
{btn}
</button>
))}
</td>
I need this so that I can trigger both animations from a keyboard event.