SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Remove hard-coded component name listing for Props 2.0 support testing (#51633)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51633

To fully support props diffing for a component, the component's Props implementation needs to implement the prop diffing for the derived class.

Because all Props classes extend the ViewProps, all Props classes implement the `getDiffProps` function. To support testing that the props diffing implementation support all properties of the derived Props class for the component being mounted, this diff adds the virtual function `getDiffPropsImplementationTarget` which returns the `ComponentName` that the `getDiffProps` function supports.

This removes the need for a hard-coded list of components that support props diffing and enables the use of codegen to conditionally enable props diffing.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75465020

fbshipit-source-id: 2850a76f1036cfe930c3c69b98d478ef86a2d457
N
Nick Lefever committed
8f2e981ab763a3137c9e4dd024b69e6a15df7d3f
Parent: 3903ce0
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/28/2025, 2:04:03 AM