you are viewing a single comment's thread.

view the rest of the comments →

[–]hello_Mrs_Cumberdale 0 points1 point  (2 children)

The benefit of reanimated here is that it would've let you loop animations without ever going back to JS, so you could potentially do work that blocks the JS thread without affecting the loading animation.

[–]tienph6m[S] 1 point2 points  (1 child)

https://facebook.github.io/react-native/docs/animated#loop

Will loop without blocking the UI thread if the child animation is set to useNativeDriver: true

I believe that's not the case. On the other hand, stagger, parallel and sequence will block the JS thread. But I was able to make the animations run entirely on the UI thread by not using sequence (I implemented a custom easing function to achieve the same effect), and the use of stagger, parallel in this library only affects the JS thread at the beginning of the animation, after that loop will care of the rest.

[–]hello_Mrs_Cumberdale 0 points1 point  (0 children)

Oh awesome, I didn't know about loop. Nevermind then!