其他分享
首页 > 其他分享> > react-native中DeviceEventEmitter使用

react-native中DeviceEventEmitter使用

作者:互联网

react-native中DeviceEventEmitter使用分为三步:
第一步:引入
在这里插入图片描述
第二步:注册监听事件
在这里插入图片描述
第三步:组件销毁的时候将其移除
在这里插入图片描述
第四步:调用事件
在这里插入图片描述

标签:DeviceEventEmitter,react,事件,移除,第四步,native
来源: https://blog.csdn.net/sinat_41747081/article/details/98957469