Releases: rgommezz/react-native-offline
Releases · rgommezz/react-native-offline
v6.0.1
v6.0.0
- Adds support for
[email protected]
- Web support
v5.8.0
v5.7.0
v5.3.0
v5.2.0
v5.1.0
v4.3.0
v4.1.0
v4.0.0
Summary
This release is a full-blown refactor of the library, where some of the core components have been re-written from scratch, providing a better modularity, using the latest React features and adopting a TDD strategy, where all the code is unit tested to facilitate external contributions in the future.
Added
- Full feature parity between components and sagas
- 100% unit test coverage in components, redux utilities and sagas
Breaking changes
Components
withNetworkConnectivity
HOC has been replaced withNetworkProvider
andNetworkConsumer
components, that leverage the new React Context API.- The following props/config have changed:
timeout
->pingTimeout
withExtraHeadRequest
->shouldPing
checkConnectionInterval
->pingInterval
checkIntervalOfflineOnly
->pingOnlyIfOffline
checkInBackground
->pingInBackground
ConnectivityRenderer
doesn't exist anymore. UseNetworkConsumer
from now on.
Redux integration
withNetworkConnectivity({ withRedux: true })
has been replaced withReduxNetworkProvider
component.ReduxNetworkProvider
receives the same props asNetworkProvider
to configure the behaviour.- 2nd step (saga integration):
networkEventsListenerSaga
has been renamed tonetworkSaga
.
Utilities
checkInternetConnection
Function params order has been reversed. Now 1st argument is theurl
and 2nd thetimeout
.