mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Instead of checking whether `YG_ENABLE_EVENTS` is defined for every publish, we simply wrap the body of the `publish` function macro that delegates to the method that actually publishes the event. This way we get 1. easier to write code where we publish events 2. more type safety when editing, enabling editors/IDEs to show errors without knowing about `YG_ENABLE_EVENTS` Reviewed By: SidharthGuglani Differential Revision: D16049888 fbshipit-source-id: cbf362d6f7be5053c3f377125d303b7137d6a241