From 142af1751b8a64e2230c7af931f6296be7888183 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sun, 7 Jul 2019 22:42:50 -0700 Subject: [PATCH] Fabric: Unconditional state management in Binding::schedulerDidFinishTransaction Summary: Originally, moving the mount instruction generation under the `if` was a perf optimization but now, since we converge `LocalData` and `State`, this is no longer possible (because we need to treat State as LocalData in some cases). Reviewed By: mdvacca Differential Revision: D15962378 fbshipit-source-id: 37f9fadb72ac53450c2d499452610d9835f2964d --- .../java/com/facebook/react/fabric/jni/Binding.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index bb52df9d89f..4139523ed71 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -559,12 +559,12 @@ void Binding::schedulerDidFinishTransaction( deletedViewTags.end()) { mountItems[position++] = createUpdatePropsMountItem(localJavaUIManager, mutation); + } - // State - if (mutation.newChildShadowView.state) { - mountItems[position++] = - createUpdateStateMountItem(localJavaUIManager, mutation); - } + // State + if (mutation.newChildShadowView.state) { + mountItems[position++] = + createUpdateStateMountItem(localJavaUIManager, mutation); } // LocalData