Closed Kudo closed 2 months ago
Could the "test plan" code actually be added as a new example in the example app?
Could the "test plan" code actually be added as a new example in the example app?
added as the MultiMessaging example
:tada: This PR is included in version 13.8.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for sorting this out @Kudo !
awesome! thanks @TheAlmightyBob for publishing the fix!
Why
Fixes #3368 which is my regression from #3352
How
JSModule
registerCallableModule()
does not support multiple listeners. The newer WebView will overwrite the previously registered callbacks. This PR tries to moveregisterCallableModule()
at top as a module singleton. With an intermediate EventEmitter to dispatch events to each WebViews. I tries to import the internal vendored EventEmitter from react-native. If that is not ideal, we could replace as third-party EventEmitter such as fbemitter.Test Plan
extend the Messsaging.tsx example as two WebViews and check whether messages are sent correctly.
demo video: Screen_recording_20240411_013607.webm