Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ YogaStylableProps::YogaStylableProps(
const YogaStylableProps& sourceProps,
const RawProps& rawProps,
const std::function<bool(const std::string&)>& filterObjectKeys)
: Props() {
initialize(context, sourceProps, rawProps, filterObjectKeys);

yogaStyle = ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
? sourceProps.yogaStyle
: convertRawProp(context, rawProps, sourceProps.yogaStyle);

: Props(context, sourceProps, rawProps, filterObjectKeys),
yogaStyle(
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
? sourceProps.yogaStyle
: convertRawProp(context, rawProps, sourceProps.yogaStyle)) {
if (!ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) {
convertRawPropAliases(context, sourceProps, rawProps);
}
Expand Down
23 changes: 10 additions & 13 deletions packages/react-native/ReactCommon/react/renderer/core/Props.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@
namespace facebook::react {

Props::Props(
const PropsParserContext& context,
const Props& sourceProps,
const RawProps& rawProps,
const std::function<bool(const std::string&)>& filterObjectKeys) {
initialize(context, sourceProps, rawProps, filterObjectKeys);
}

void Props::initialize(
const PropsParserContext& context,
const Props& sourceProps,
const RawProps& rawProps,
[[maybe_unused]] const std::function<bool(const std::string&)>&
filterObjectKeys) {
nativeId = ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
? sourceProps.nativeId
: convertRawProp(context, rawProps, "nativeID", sourceProps.nativeId, {});

filterObjectKeys)
: nativeId(
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
? sourceProps.nativeId
: convertRawProp(
context,
rawProps,
"nativeID",
sourceProps.nativeId,
{})) {
#ifdef RN_SERIALIZABLE_STATE
if (!ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid()) {
initializeDynamicProps(sourceProps, rawProps, filterObjectKeys);
Expand Down
12 changes: 0 additions & 12 deletions packages/react-native/ReactCommon/react/renderer/core/Props.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ class Props : public virtual Sealable, public virtual DebugStringConvertible {
SharedDebugStringConvertibleList getDebugProps() const override;

#endif

protected:
/** Initialize member variables of Props instance */
void initialize(
const PropsParserContext &context,
const Props &sourceProps,
const RawProps &rawProps,
/**
* Filter object keys to be excluded when converting the RawProps to
* folly::dynamic (android only)
*/
const std::function<bool(const std::string &)> &filterObjectKeys = nullptr);
};

} // namespace facebook::react
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -4125,7 +4125,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -3979,7 +3979,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -4122,7 +4122,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6312,7 +6312,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6194,7 +6194,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6309,7 +6309,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -2730,7 +2730,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,6 @@ class facebook::react::PreparedTextCacheKey {
}

class facebook::react::Props : public virtual facebook::react::Sealable, public virtual facebook::react::DebugStringConvertible {
protected void initialize(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
public Props() = default;
public Props(const facebook::react::Props& other) = delete;
public Props(const facebook::react::PropsParserContext& context, const facebook::react::Props& sourceProps, const facebook::react::RawProps& rawProps, const std::function<bool(const std::string&)>& filterObjectKeys = nullptr);
Expand Down
Loading