Continously rotating without jumps between tours

Author: korbavCreated May 4, 2021Updated Oct 11, 2022

I'm trying to achieve a very simple thing, rotating a square continuously without a jump between 2 tours. I want to keep control of the position and therefore I don't want to use the loop property available in the different hooks.

I created a codesandbox to explain the current situation : https://codesandbox.io/s/twilight-http-l0jm0?file=/src/App.js

As you can see when it goes forward 360 degrees, it's animating all the way back to go to 0. I suppose this is the expected behaviour. Thus, my question is, is there any way to smoothly animate between 2 rotation tours instead of animating all the way back?

Thanks in advance!