diff --git a/ReactCommon/yoga/yoga/Yoga.cpp b/ReactCommon/yoga/yoga/Yoga.cpp index 6c739a069e0..e8a2e512347 100644 --- a/ReactCommon/yoga/yoga/Yoga.cpp +++ b/ReactCommon/yoga/yoga/Yoga.cpp @@ -4013,7 +4013,7 @@ void YGNodeCalculateLayoutWithContext( void* layoutContext) { #ifdef YG_ENABLE_EVENTS - Event::publish(node); + Event::publish(node, {layoutContext}); #endif // unique pointer to allow ending the marker early std::unique_ptr> marker{ diff --git a/ReactCommon/yoga/yoga/event/event.h b/ReactCommon/yoga/yoga/event/event.h index 9dcd73b6a0f..e7415566f56 100644 --- a/ReactCommon/yoga/yoga/event/event.h +++ b/ReactCommon/yoga/yoga/event/event.h @@ -72,6 +72,11 @@ struct Event::TypedData { YGConfig* config; }; +template <> +struct Event::TypedData { + void* layoutContext; +}; + template <> struct Event::TypedData { void* layoutContext;