-
Notifications
You must be signed in to change notification settings - Fork 25k
[ReactNative] Add "RCTNativeAppEventEmitter" #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ReactNative] Add "RCTNativeAppEventEmitter" #918
Conversation
- As referenced in RCTEventDispatcher#sendAppEventWithName
|
e2e test failed but that seems to be an existing issue unrelated to this branch |
|
Any reason not to merge this one? |
|
@brentvatne why not just use |
|
get it. thanks :-) Henter On Friday, May 8, 2015 at 11:26, Brent Vatne wrote:
|
|
@brentvatne I think, @henter kind of has a point... Your But the documentation suggests registering at Now, I see that there is a separate I wonder whether those two pieces add up. Is it possible that the documentation suggests registering at Intuitively I was expecting a fix along the lines of: Am I completely wrong? |
|
@brentvatne What really fixed my problem was #1275, which simply suggests using |
|
@brentvatne the CI seems to fail for some reason any idea why? |
|
@yelled3 unfortunately we have some instability in our tests, so that is probably an unrelated failure :( I believe (but wasn't involved so not sure) the purpose of having both emitters is to provide namespacing and clarity. Device events should only be emitted by the system, whereas app events should be used for whatever custom events you have in your app. I'll merge this in soon. |
As mentioned in #906, in the docs it mentions sending native app events eg: calendar event reminder received, through the
RCTNativeAppEventEmitter, but the JS module for that is missing. This adds it - it's nothing more than an instance ofEventEmitter, just like RCTDeviceEventEmitter.