RCTDeviceEventEmitter bridgeless alternative (Turbo Models) #213
Replies: 3 comments 6 replies
-
I see that pass a Callback is not valid since it used bridge ` public String addUnitToPageAndroid(String pageId, String mode, String placement, Callback callback) { package com.facebook.react.bridge; public interface Callback { |
Beta Was this translation helpful? Give feedback.
-
Have a look at this example. It uses swift but shows how to send events from Native to JS for iOS |
Beta Was this translation helpful? Give feedback.
-
I am also totally interested in a solution to use events like implemented via RCTEventEmitter in the bridge mode. On JS Side i want to listen to a pure event, fired on the Native Side. For example, i need it to handle click interactions on Carplay Screen (init player and play music via RN Track Player). I found no fully understandable doc on the RN page. Thank you in advance :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@cipolleschi
Hi there,
I'm trying to send events from Turbo Models to the JS side. I understand that in the new architecture, EventDispatcher (react-native-menu/menu@247e0ec) is necessary. However, it requires a viewTag, which isn't available in Turbo Modules.
Is there a bridgeless alternative to RCTDeviceEventEmitter for sending events from Turbo Models (iOS and Android) ?
Thanks
#144
Beta Was this translation helpful? Give feedback.
All reactions