Skip to content

Commit

Permalink
feat(wx-react-native): 添加DeviceEventEmitter not support 说明
Browse files Browse the repository at this point in the history
  • Loading branch information
ykforerlang committed Jul 10, 2019
1 parent f7dbbf7 commit bcf0869
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions packages/wx-react-native/miniprogram_dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ const NativeAppEventEmitter = {
}
},
}
const DeviceEventEmitter = {
addListener: () => {
console.warn('use @areslabs/wx-eventemitter instead')
return () => {
console.warn('use @areslabs/wx-eventemitter instead')
}
},
}

export {
WXButton,
Expand Down Expand Up @@ -122,7 +130,8 @@ export {
cancelAnimationFrame,
unstable_batchedUpdates,
AppState,
NativeAppEventEmitter
NativeAppEventEmitter,
DeviceEventEmitter
}

export default {
Expand Down Expand Up @@ -173,5 +182,6 @@ export default {
cancelAnimationFrame,
unstable_batchedUpdates,
AppState,
NativeAppEventEmitter
NativeAppEventEmitter,
DeviceEventEmitter
}
2 changes: 1 addition & 1 deletion packages/wx-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@areslabs/wx-react-native",
"version": "1.0.22",
"version": "1.0.23",
"description": "微信版本的React Native",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit bcf0869

Please sign in to comment.