通过
NetInfo.addEventListener('change', this._handleConnectivityChange);
监听网络状态,在_handleConnectivityChange函数内无法操作this,注解监听代码修改为:
NetInfo.addEventListener('change', this._handleConnectivityChange.bind(this));
却现无法卸载网络监听,怎样才能在_handleConnectivityChange函数内操作this呢?