diff --git a/packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js b/packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js index f5fc4af494e27f..380e085dfbadc1 100644 --- a/packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js +++ b/packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js @@ -462,27 +462,27 @@ function fastAddProperties( attributeConfig = validAttributes[propKey]; - if (attributeConfig === undefined) { + if (!attributeConfig) { continue; } - if (typeof nextProp === 'function') { - nextProp = (true: any); - } + let newValue; - if (typeof attributeConfig !== 'object') { - if (!updatePayload) { - updatePayload = ({}: {[string]: $FlowFixMe}); - } - updatePayload[propKey] = nextProp; - continue; + if (typeof nextProp === 'function') { + newValue = (true: any); + } else if (typeof attributeConfig !== 'object') { + newValue = nextProp; + } else if (typeof attributeConfig.process === 'function') { + newValue = attributeConfig.process(nextProp); + } else if (typeof attributeConfig.diff === 'function') { + newValue = nextProp; } - if (typeof attributeConfig.process === 'function') { + if (newValue !== undefined) { if (!updatePayload) { updatePayload = ({}: {[string]: $FlowFixMe}); } - updatePayload[propKey] = attributeConfig.process(nextProp); + updatePayload[propKey] = newValue; continue; }