Skip to content
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

RCTEventDispatcher is calling missing JS module #906

Closed
jnhuynh opened this issue Apr 17, 2015 · 2 comments
Closed

RCTEventDispatcher is calling missing JS module #906

jnhuynh opened this issue Apr 17, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jnhuynh
Copy link

jnhuynh commented Apr 17, 2015

React's doc for sending events to JS from native code suggests using RCTEventDispatcher's sendAppEventWithName:body method.

The problem is that RCTNativeAppEventEmitter does not exist. Not sure what the correct solution to this is. Should we create a RCTNativeAppEventEmitter module? Or should the docs suggest using sendDeviceEventWithName:body.

- (void)sendAppEventWithName:(NSString *)name body:(id)body
{
  [_bridge enqueueJSCall:@"RCTNativeAppEventEmitter.emit"
                    args:body ? @[name, body] : @[name]];
}
@mymickey
Copy link

+1

@brentvatne
Copy link
Collaborator

@jnhuynh @mymickey - pull request create, closing this issue to move the discussion there!

vjeux pushed a commit to vjeux/react-native that referenced this issue May 16, 2015
Summary:
As mentioned in facebook#906, [in the docs it mentions sending native app events](http://facebook.github.io/react-native/docs/nativemodulesios.html#sending-events-to-javascript) 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 of `EventEmitter`, just like [RCTDeviceEventEmitter](https://github.com/facebook/react-native/blob/master/Libraries/Device/RCTDeviceEventEmitter.js).
Closes facebook#918
Github Author: Brent Vatne <[email protected]>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants