diff --git a/CachedImage.js b/CachedImage.js index 294b543..daf03c8 100644 --- a/CachedImage.js +++ b/CachedImage.js @@ -79,7 +79,7 @@ class CachedImage extends React.Component { componentWillMount() { this._isMounted = true; - NetInfo.isConnected.addEventListener('change', this.handleConnectivityChange); + NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange); // initial NetInfo.isConnected.fetch() .then(isConnected => { @@ -93,7 +93,7 @@ class CachedImage extends React.Component { componentWillUnmount() { this._isMounted = false; - NetInfo.isConnected.removeEventListener('change', this.handleConnectivityChange); + NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange); } componentWillReceiveProps(nextProps) {