Skip to content

Add experimental flag to enable props diffing only for core components - #59526

Open
coado wants to merge 1 commit into
react:mainfrom
coado:export-D127587361
Open

coado wants to merge 1 commit into
react:mainfrom
coado:export-D127587361

Conversation

@coado

@coado coado commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Summary:
Props diffing (enablePropsUpdateReconciliationAndroid) applies to every component whose props implement getDiffProps, which includes all codegen components. On view creation, props equal to their C++ default are not sent, so a native component whose default differs from the C++ default ends up with the wrong value. Third-party components have not been checked for this, which makes the existing flag unsafe to try in OSS.

This adds enableCoreComponentsPropsUpdateReconciliationAndroid, released in the experimental stage, which enables props diffing only for the core components with hand-written props (View, Paragraph, Text, RawText, TextEffect, Image, ScrollView, TextInput). All other components keep receiving raw props.

The decision now lives in a single non-virtual function, isPropsDiffingEnabled, used by both FabricMountingManager::getProps and ConcreteComponentDescriptor::cloneProps, so the two decisions cannot diverge. Behavior with the new flag off is unchanged.

Changelog:
[Android][Added] - Add experimental feature flag enableCoreComponentsPropsUpdateReconciliationAndroid to send prop updates based on props diffing for core components only

Differential Revision: D127587361

Summary:
Props diffing (`enablePropsUpdateReconciliationAndroid`) applies to every component whose props implement `getDiffProps`, which includes all codegen components. On view creation, props equal to their C++ default are not sent, so a native component whose default differs from the C++ default ends up with the wrong value. Third-party components have not been checked for this, which makes the existing flag unsafe to try in OSS.

This adds `enableCoreComponentsPropsUpdateReconciliationAndroid`, released in the experimental stage, which enables props diffing only for the core components with hand-written props (View, Paragraph, Text, RawText, TextEffect, Image, ScrollView, TextInput). All other components keep receiving raw props.

The decision now lives in a single non-virtual function, `isPropsDiffingEnabled`, used by both `FabricMountingManager::getProps` and `ConcreteComponentDescriptor::cloneProps`, so the two decisions cannot diverge. Behavior with the new flag off is unchanged.

Changelog:
[Android][Added] - Add experimental feature flag `enableCoreComponentsPropsUpdateReconciliationAndroid` to send prop updates based on props diffing for core components only

Differential Revision: D127587361
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 27, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 27, 2026
@meta-codesync

meta-codesync Bot commented Oct 27, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127587361.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant