A framework for building native applications using React
Default init custom C++ TM struct properties (#54391)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54391
Changelog: [Internal][Fixed] Default init custom C++ TM struct properties
Right now we don't do it and produce code as:
```
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
struct NativeEditableObjectModulePropertyVal {
P0 classOrList;
P1 commonFields;
P2 desc;
P3 isDefault;
P4 isSet;
P5 scriptValue;
P6 value;
bool operator==(const NativeEditableObjectModulePropertyVal &other) const {
return classOrList == other.classOrList && commonFields == other.commonFields && desc == other.desc && isDefault == other.isDefault && isSet == other.isSet && scriptValue == other.scriptValue && value == other.value;
}
};
```
Now we do:
```
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
struct NativeEditableObjectModulePropertyVal {
P0 classOrList{};
P1 commonFields{};
P2 desc{};
P3 isDefault{};
P4 isSet{};
P5 scriptValue{};
P6 value{};
bool operator==(const NativeEditableObjectModulePropertyVal &other) const {
return classOrList == other.classOrList && commonFields == other.commonFields && desc == other.desc && isDefault == other.isDefault && isSet == other.isSet && scriptValue == other.scriptValue && value == other.value;
}
};
```
Reviewed By: sbuggay, lenaic
Differential Revision: D86142954
fbshipit-source-id: 989e81c55b1fad7e1e58ea89461f064772143c9d C
Christoph Purrer committed
c7a6935587862c16a2b680ef03bbfa8eb500da53
Parent: 8fa8fb7
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 11/4/2025, 12:49:44 PM