mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
69f8cf14f0
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34750 This Diff is the first step of enabling the CodeGen to parse and generate a NativeState for the components. The feature has been largely requested by the OSS community but it could be also helpful for people in Meta. To allow the generation of custom `NativeState`, we first have to always generate a `ViewEventEmitter`: that's because the `ConcreteShadowNode` template lists the Generics with this order: `Name`, `Props`, `EventEmitter`, Others... If we skip the `EventEmitters` and we put the `State`, React Native would think that the State is actually an `EventEmitter` and the build step will fail. ## Changelog [General][Added] - Always generate a ViewEventEmitter for Fabric Components Reviewed By: cortinico Differential Revision: D39509869 fbshipit-source-id: 390cc146ef013baf1ed09d55a0182a5aeb5b9d9e