diff --git a/ReactCommon/yoga/yoga/Yoga.cpp b/ReactCommon/yoga/yoga/Yoga.cpp index 05fb10d278f..5f6fa875e0b 100644 --- a/ReactCommon/yoga/yoga/Yoga.cpp +++ b/ReactCommon/yoga/yoga/Yoga.cpp @@ -3667,6 +3667,9 @@ bool YGLayoutNodeInternal( const YGConfigRef config, YGMarkerLayoutData& layoutMarkerData, void* const layoutContext) { +#ifdef YG_ENABLE_EVENTS + Event::publish(node); +#endif YGLayout* layout = &node->getLayout(); gDepth++; diff --git a/ReactCommon/yoga/yoga/events.h b/ReactCommon/yoga/yoga/events.h index 7b04060a89a..e667d2d2bde 100644 --- a/ReactCommon/yoga/yoga/events.h +++ b/ReactCommon/yoga/yoga/events.h @@ -15,7 +15,7 @@ namespace facebook { namespace yoga { struct Event { - enum Type { NodeAllocation, NodeDeallocation }; + enum Type { NodeAllocation, NodeDeallocation, NodeLayout }; class Data; using Subscriber = void(const YGNode&, Type, Data);