Some Examples » 25. Colors: Switching between states
25. Colors: Switching between states
Here the onHoverStart()
and onHoverEnd()
events flip an isHover
state. This state, in turn, animates the box’s size and rotation and the background color.
Code component
Code overrides
Here we have two overrides, so I share the state between them with createStore
.