react-native-offline
Advanced tools
Comparing version 4.1.4 to 4.2.0
{ | ||
"name": "react-native-offline", | ||
"version": "4.1.4", | ||
"version": "4.2.0", | ||
"description": "Handy toolbelt to deal with offline mode in React Native applications. Cross-platform, provides a smooth redux integration.", | ||
@@ -83,4 +83,7 @@ "main": "./src/index.js", | ||
"^.+\\.jsx?$": "babel-jest" | ||
} | ||
}, | ||
"modulePathIgnorePatterns": [ | ||
"<rootDir>/example/" | ||
] | ||
} | ||
} |
@@ -94,5 +94,8 @@ /* @flow */ | ||
componentDidUpdate(_: *, prevState: State) { | ||
componentDidUpdate(prevProps: Props, prevState: State) { | ||
const { pingServerUrl, onConnectivityChange } = this.props; | ||
const { isConnected } = this.state; | ||
const { onConnectivityChange } = this.props; | ||
if (prevProps.pingServerUrl !== pingServerUrl) { | ||
this.checkInternet(); | ||
} | ||
if (prevState.isConnected !== isConnected) { | ||
@@ -99,0 +102,0 @@ onConnectivityChange(isConnected); |
68084
1000