score:7

Accepted answer

you can keep the current rotation in the state of your component. and add an onclick handler which increments this by 45 at the time. then use this variable in your render. here is a quick codepen of how it could be implemented: https://codepen.io/anon/pen/yzrrwm

score:3

just use css animations with transform: rotate(45deg);

add that rule to a new css class, then use an event listener in javascript on the button that adds the transform to the image.


Related Query

More Query from same tag