X Tutup
Skip to content

Commit b13e2e8

Browse files
committed
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`.
1 parent fe2155e commit b13e2e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/NativeModulesIOS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ The native module can signal events to JavaScript without being invoked directly
256256
JavaScript code can subscribe to these events:
257257
258258
```javascript
259-
var { DeviceEventEmitter } = require('react-native');
259+
var { NativeAppEventEmitter } = require('react-native');
260260
261-
var subscription = DeviceEventEmitter.addListener(
261+
var subscription = NativeAppEventEmitter.addListener(
262262
'EventReminder',
263263
(reminder) => console.log(reminder.name)
264264
);

0 commit comments

Comments
 (0)
X Tutup