Closed pcarion closed 7 years ago
Even though your code in github did a fix for that (PR), the code from npm (version 1.4.0) is still 'wrong' as it is using the wrong eventName (change instead of connectionChange
change
connectionChange
NetInfo.isConnected.addEventListener('change', ...)
The listener is also not correct:
handleConnectivityChange(isConnected) { this.safeSetState({ networkAvailable: isConnected }); }
The parameter when the listener is called is not a boolean (as you expect in your code) but an enum
Thanks @pcarion I will release v1.4.1 soon 👍
v1.4.1
Even though your code in github did a fix for that (PR), the code from npm (version 1.4.0) is still 'wrong' as it is using the wrong eventName (
change
instead ofconnectionChange
The listener is also not correct:
The parameter when the listener is called is not a boolean (as you expect in your code) but an enum