We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9d0574 commit 83d2345Copy full SHA for 83d2345
index.js
@@ -2,13 +2,11 @@
2
* Created by lvbingru on 1/5/16.
3
*/
4
5
-import {NativeModules} from 'react-native';
+import {NativeModules, NativeAppEventEmitter} from 'react-native';
6
import promisify from 'es6-promisify';
7
8
const {WeiboAPI} = NativeModules;
9
10
-AppEventEmitter = require('RCTNativeAppEventEmitter')
11
-
12
// Used only with promisify. Transform callback to promise result.
13
function translateError(err, result) {
14
if (!err) {
@@ -58,7 +56,7 @@ function waitForResponse(type) {
58
56
});
59
57
}
60
61
-AppEventEmitter.addListener('Weibo_Resp', resp => {
+NativeAppEventEmitter.addListener('Weibo_Resp', resp => {
62
const callback = savedCallback;
63
savedCallback = undefined;
64
callback && callback(resp);
0 commit comments