diff --git a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm index 2bb30a429db09d..8744f6117f5e06 100644 --- a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm +++ b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm @@ -124,6 +124,13 @@ - (void)callNativeMethodToRemoveOverlays [_view removeOverlays]; } +- (void)fireLagacyStyleEvent +{ + RNTMyNativeViewEventEmitter::OnLegacyStyleEvent value = {"Legacy Style Event Fired."}; + + std::static_pointer_cast(_eventEmitter)->onLegacyStyleEvent(value); +} + @end Class RNTMyNativeViewCls(void) diff --git a/packages/rn-tester/NativeComponentExample/js/MyNativeView.js b/packages/rn-tester/NativeComponentExample/js/MyNativeView.js index a6af3c2fbbba4a..5d992c04f4fd70 100644 --- a/packages/rn-tester/NativeComponentExample/js/MyNativeView.js +++ b/packages/rn-tester/NativeComponentExample/js/MyNativeView.js @@ -119,6 +119,9 @@ export default function MyNativeView(props: {}): React.Node { console.log(event.nativeEvent.latLons); console.log(event.nativeEvent.multiArrays); }} + onLegacyStyleEvent={event => { + console.log(event.nativeEvent.string); + }} /> Legacy View - +