We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f5be4b commit 6c70ef8Copy full SHA for 6c70ef8
CachedImage.js
@@ -87,7 +87,7 @@ const CachedImage = React.createClass({
87
88
componentWillMount() {
89
this._isMounted = true;
90
- NetInfo.isConnected.addEventListener('change', this.handleConnectivityChange);
+ NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
91
// initial
92
NetInfo.isConnected.fetch()
93
.then(isConnected => {
@@ -101,7 +101,7 @@ const CachedImage = React.createClass({
101
102
componentWillUnmount() {
103
this._isMounted = false;
104
- NetInfo.isConnected.removeEventListener('change', this.handleConnectivityChange);
+ NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
105
},
106
107
componentWillReceiveProps(nextProps) {
0 commit comments