Hey there !
I haven't been following the Animated API too closely, but from what I gathered looking at the RN repo, and correct me if I'm wrong, it looks like the API now has a native driver for each platform.
Maybe it's too soon, but react-native-animatable could probably take advantage of this. See useNativeDriver: true
Has anyone tested these new features ?
I'm afraid it's not yet ready for prime time, but I'm following this closely and hopefully soon it will be.
Also looking forward to the possibility of this!
@zibs @kamek-pf @udfalkso @Roconda: Please test this PR out https://github.com/oblador/react-native-animatable/pull/67
@oblador I just pulled the PR and tried to make a simple animation native
<Animatable.View animation="fadeInDownBig" duration={500} useNativeDriver>
on android and get this:
E/unknown:React: Exception in native call from JS
com.facebook.react.bridge.JSApplicationIllegalArgumentException: Unsupported node type: transform
at com.facebook.react.animated.NativeAnimatedNodesManager.createAnimatedNode(NativeAnimatedNodesManager.java:82)
at com.facebook.react.animated.NativeAnimatedModule$2.execute(NativeAnimatedModule.java:188)
at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:110)
at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:618)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Looks like transform support is coming:
https://github.com/facebook/react-native/commit/df053117778d8ebcc1943f20127e49078f79da0b
@rdews This works on iOS AFAIK.
Yes. And after upgrading react to 0.38.0-rc1 it works on android too. Thanks!
This was just released in 1.0.0.
Most helpful comment
I'm afraid it's not yet ready for prime time, but I'm following this closely and hopefully soon it will be.