From b13e2e8c2ef8c943f99bcbb3a8e1ff60cf526c0a Mon Sep 17 00:00:00 2001 From: Colin Ramsay Date: Tue, 7 Jul 2015 15:04:50 +0100 Subject: [PATCH] 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`. --- docs/NativeModulesIOS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/NativeModulesIOS.md b/docs/NativeModulesIOS.md index 1fa4f93fb..acba1f05f 100644 --- a/docs/NativeModulesIOS.md +++ b/docs/NativeModulesIOS.md @@ -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) );