Skip to content

Commit 23c18b9

Browse files
committed
feat: prioritize attribute config process function to allow processing function props
1 parent 829401d commit 23c18b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,15 @@ function fastAddProperties(
478478
} else {
479479
continue;
480480
}
481+
} else if (typeof attributeConfig.process === 'function') {
482+
// An atomic prop with custom processing.
483+
newValue = attributeConfig.process(prop);
481484
} else if (typeof prop === 'function') {
482485
// A function prop. It represents an event handler. Pass it to native as 'true'.
483486
newValue = true;
484487
} else if (typeof attributeConfig !== 'object') {
485488
// An atomic prop. Doesn't need to be flattened.
486489
newValue = prop;
487-
} else if (typeof attributeConfig.process === 'function') {
488-
// An atomic prop with custom processing.
489-
newValue = attributeConfig.process(prop);
490490
} else if (typeof attributeConfig.diff === 'function') {
491491
// An atomic prop with custom diffing. We don't need to do diffing when adding props.
492492
newValue = prop;

0 commit comments

Comments
 (0)