Skip to content

Commit c11fe68

Browse files
dmytrorykunfacebook-github-bot
authored andcommitted
Run the enableAccumulatedUpdatesInRawPropsAndroid QE for View only
Summary: The `enableAccumulatedUpdatesInRawPropsAndroid` param will be tested together with the `enablePropsUpdateReconciliationAndroid` param. `enablePropsUpdateReconciliationAndroid` currently only supports `View` components. This diff changes `enableAccumulatedUpdatesInRawPropsAndroid` to also run only for `View`s. Differential Revision: D68492332
1 parent ce41274 commit c11fe68

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,20 @@ jni::local_ref<jobject> getProps(
220220
// and the Props of the latest commited ShadowTree). ONLY for <View>
221221
// components when the "enablePropsUpdateReconciliationAndroid" feature flag
222222
// is enabled.
223-
auto* oldProps = oldShadowView.props.get();
224223
auto* newProps = newShadowView.props.get();
225-
if (ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid() &&
226-
strcmp(newShadowView.componentName, "View") == 0) {
227-
return ReadableNativeMap::newObjectCxxArgs(
228-
newProps->getDiffProps(oldProps));
229-
}
230-
if (ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) {
231-
if (oldProps == nullptr) {
232-
return ReadableNativeMap::newObjectCxxArgs(newProps->rawProps);
233-
} else {
224+
if (strcmp(newShadowView.componentName, "View") == 0) {
225+
auto* oldProps = oldShadowView.props.get();
226+
if (ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid()) {
234227
return ReadableNativeMap::newObjectCxxArgs(
235-
diffDynamicProps(oldProps->rawProps, newProps->rawProps));
228+
newProps->getDiffProps(oldProps));
229+
}
230+
if (ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) {
231+
if (oldProps == nullptr) {
232+
return ReadableNativeMap::newObjectCxxArgs(newProps->rawProps);
233+
} else {
234+
return ReadableNativeMap::newObjectCxxArgs(
235+
diffDynamicProps(oldProps->rawProps, newProps->rawProps));
236+
}
236237
}
237238
}
238239
return ReadableNativeMap::newObjectCxxArgs(newProps->rawProps);

0 commit comments

Comments
 (0)