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

missing require('RCTDeviceEventEmitter'); #623

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/NativeModulesIOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ The native module can signal events to JavaScript without being invoked directly
JavaScript code can subscribe to these events:

```javascript
var DeviceEventEmitter = require('RCTDeviceEventEmitter');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeviceEventEmitter is part of react-native exports now

var { DeviceEventEmitter } = require('react-native');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to revision via CocoPods ? Please give me a hand.
Yes, I saw the latest version on github is 0.3.4
But I use pod search result is 0.2.1

-> React (0.2.1)
   Build high quality mobile apps using React.
   pod 'React', '~> 0.2.1'
   - Homepage: http://facebook.github.io/react-native/
   - Source:   https://github.com/facebook/react-native.git
   - Versions: 0.2.1, 0.2.0, 0.1.0 [master repo]

var subscription = DeviceEventEmitter.addListener(
'EventReminder',
(reminder) => console.log(reminder.name)
Expand Down