From 82642bae40669a697bfc7a6232b2a14b9fdeb766 Mon Sep 17 00:00:00 2001 From: David Vacca <515103+mdvacca@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:58:27 -0700 Subject: [PATCH] Introduce Props.getDiffProps method Summary: This diff introduces a "temporary" method called getDiffProps to calculate the difference between 2 props and serialize its result into a folly::dynamic map. changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D59613245 --- .../react-native/ReactCommon/react/renderer/core/Props.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/ReactCommon/react/renderer/core/Props.h b/packages/react-native/ReactCommon/react/renderer/core/Props.h index 0c34109850fc..144cc8a039d0 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Props.h +++ b/packages/react-native/ReactCommon/react/renderer/core/Props.h @@ -59,6 +59,11 @@ class Props : public virtual Sealable, public virtual DebugStringConvertible { #ifdef ANDROID folly::dynamic rawProps = folly::dynamic::object(); + + virtual folly::dynamic getDiffProps(const Props* prevProps) const { + return folly::dynamic::object(); + } + #endif protected: