4 ms·
I've done a bit of work on React Native animations. We are mostly working on two experimental animation APIs. One is implemented fully in JS and is used when w
by evv 12y ago
I've done a bit of work on React Native animations. We are mostly working on two experimental animation APIs.
One is implemented fully in JS and is used when we need to implement gestures and respond to ongoing touch interactions. This is tricky because we need to be very careful to keep our JS frames very short and fast during the gesture, avoiding expensive allocations and making sure we don't try to process too much data in Relay.
The other API is much more magical. You configure the animation for your component immediately before a setState. The new layout is computed normally, but instead of directly updating the native views, we use POP[1] to animate to them on the main thread. This is a really easy-to-use API, but there are a few caveats.
We're still developing, stabilizing, and cleaning up these tools. It's great to hear your interested in this, we'll try to open something up before too long!
[1] https://github.com/facebook/pop https://github.com/facebook/pop