You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all native events are fired via a global RCTDeviceEventEmitter.
This means event names must be globally unique, and it means that call sites
can theoretically listen to RCTDeviceEventEmitter (although discouraged).
But I guess it's quite appealing for lib authors to call the event name onEvent :-)
A simple solution would be to just prefix all the event names with pusher: and update the JS to delegate with this prefix behind the scenes.
I'll fork and update the code with this change, since I'm blocked in my project by this issue.
And I'll get back with a PR, in case it's worth merging back in the master here.
The text was updated successfully, but these errors were encountered:
The event name(s) emitted by the native module to JS are too generic and they conflict with other libs that emit the same event names.
My specific problem (conflict) is with Agora RTC react-native which uses a single event named
"onEvent"
.The React Native code says:
But I guess it's quite appealing for lib authors to call the event name
onEvent
:-)A simple solution would be to just prefix all the event names with
pusher:
and update the JS to delegate with this prefix behind the scenes.I'll fork and update the code with this change, since I'm blocked in my project by this issue.
And I'll get back with a PR, in case it's worth merging back in the master here.
The text was updated successfully, but these errors were encountered: