[react-native] Pull up enableFastAddPropertiesInDiffing check (#33043)
## Summary We don't need the isArray check for this experiment, as `fastAddProperties` already does the same. Also renaming slowAddProperties to make it clearer we can fully remove this codepath once fastAddProperties is fully rolled out. ## How did you test this change? ``` yarn test packages/react-native-renderer -r=xplat --variant=true ```
Pieter De Baets committed
Apr 29, 2025 at 11:10 UTC
0038c501a307e5ddc0cb80027e55740ddda09520
1 file changed
+6
-6
packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js
+6
-6
@@ -219,13 +219,13 @@ function addNestedProperty(
219
return updatePayload;
220
}
221
222
+ if (enableFastAddPropertiesInDiffing) {
223
+ return fastAddProperties(updatePayload, nextProp, validAttributes);
224
+ }
225
+
226
if (!isArray(nextProp)) {
227
// Add each property of the leaf.
224
- if (enableFastAddPropertiesInDiffing) {
225
- return fastAddProperties(updatePayload, nextProp, validAttributes);
226
- } else {
227
- return addProperties(updatePayload, nextProp, validAttributes);
228
- }
228
+ return slowAddProperties(updatePayload, nextProp, validAttributes);
229
}
230
231
for (let i = 0; i < nextProp.length; i++) {
@@ -516,7 +516,7 @@ function fastAddProperties(
516
/**
517
* addProperties adds all the valid props to the payload after being processed.
518
*/
519
-function addProperties(
519
+function slowAddProperties(
520
updatePayload: null | Object,
521
props: Object,
522
validAttributes: AttributeConfiguration,