Update NativeModule documentation to show correct event emitter usage

It looks like in the various changes to native module events, the documentation has become a little confused. As far as I can tell, if you use `sendAppEventWithName` then the `NativeAppEventEmitter` is used and if `sendDeviceEventWithName` then it should be `DeviceEventEmitter`.
This commit is contained in:
Colin Ramsay 2015-07-07 15:04:50 +01:00
parent fe2155e238
commit b13e2e8c2e
1 changed files with 2 additions and 2 deletions

View File

@ -256,9 +256,9 @@ The native module can signal events to JavaScript without being invoked directly
JavaScript code can subscribe to these events:
```javascript
var { DeviceEventEmitter } = require('react-native');
var { NativeAppEventEmitter } = require('react-native');
var subscription = DeviceEventEmitter.addListener(
var subscription = NativeAppEventEmitter.addListener(
'EventReminder',
(reminder) => console.log(reminder.name)
);