RCTDeviceEventEmitter bridgeless alternative (Turbo Models) #213
DanielFrTB
started this conversation in
Libraries
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 { |
0 replies
|
Have a look at this example. It uses swift but shows how to send events from Native to JS for iOS |
2 replies
|
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 :) |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
All reactions