Is there a reliable method to synchronize an interval function called by a useEffect in a React app and a css animation? I have set the interval for every 4 seconds, matching the duration of the animation. However, it seems that they are not always perfectly aligned. The class resets when added and removed by the interval function, but the animation completion does not consistently match the js interval. Should I consider moving the animation to JavaScript, or is there a suitable workaround for this issue?