NativeAnimatedModule: allow JS to control queueing of Animated operations

Summary:
In the past I tried a few heuristics to guess when a batch of Animated Operations were ready, and none of these were super reliable. But it turns out we can safely allow JS to manage that explicitly.

Non-Fabric still uses the old behavior which seems fine.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23010844

fbshipit-source-id: 4c688d3a61460118557a4971e549ec7457f3eb8f
This commit is contained in:
Joshua Gross authored and Facebook GitHub Bot committed 2020-08-09 01:39:29 -07:00
1 parent 0af275e3be
commit 73242b45a9
9 files changed
+141 -44

No files matched your search

@@ -56,6 +56,9 @@ public abstract class NativeAnimatedModuleSpec extends ReactContextBaseJavaModul
@ReactMethod
public abstract void setAnimatedNodeValue(double nodeTag, double value);
@ReactMethod
public abstract void startOperationBatch();
@ReactMethod
public abstract void setAnimatedNodeOffset(double nodeTag, double offset);
@@ -79,6 +82,9 @@ public abstract class NativeAnimatedModuleSpec extends ReactContextBaseJavaModul
@ReactMethod
public abstract void createAnimatedNode(double tag, ReadableMap config);
@ReactMethod
public abstract void finishOperationBatch();
@ReactMethod
public abstract void startListeningToAnimatedNodeValue(double tag);