Handy toolbelt to deal nicely with offline/online connectivity in a React Native app. Smooth redux integration ✈️
MIT License
Bot releases are hidden (Show)
Fixes a peer dependency issue with [email protected]
Published by rgommezz about 3 years ago
[email protected]
Published by rgommezz over 3 years ago
Added useIsConnected
hook
Published by rgommezz over 4 years ago
Published by rgommezz over 4 years ago
Rewriting the library with Typescript + exporting types to consumers
Published by rgommezz about 5 years ago
This release exposes a new api, createReducer
, that allows you to customise the way the offline queue handles duplicates.
Published by rgommezz over 5 years ago
A new optional parameter has been added, queueReleaseThrottle
. It allows you to interval the dispatches when flushing the offline queue. It defaults to 50ms.
Published by rgommezz almost 6 years ago
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.
withNetworkConnectivity
HOC has been replaced with NetworkProvider
and NetworkConsumer
components, that leverage the new React Context API.timeout
-> pingTimeout
withExtraHeadRequest
-> shouldPing
checkConnectionInterval
-> pingInterval
checkIntervalOfflineOnly
-> pingOnlyIfOffline
checkInBackground
-> pingInBackground
ConnectivityRenderer
doesn't exist anymore. Use NetworkConsumer
from now on.withNetworkConnectivity({ withRedux: true })
has been replaced with ReduxNetworkProvider
component.ReduxNetworkProvider
receives the same props as NetworkProvider
to configure the behaviour.networkEventsListenerSaga
has been renamed to networkSaga
.checkInternetConnection
Function params order has been reversed. Now 1st argument is the url
and 2nd the timeout
.Published by rgommezz about 6 years ago
https
protocol across all components.Published by rgommezz about 6 years ago
HEAD
and OPTIONS
as http methods for checking internet accessPublished by rgommezz over 6 years ago
Exporting checkInternetConnection
function to query internet access on demand
Published by rgommezz over 6 years ago
Adds ability to check for connectivity in background, defaults to false
Published by rgommezz almost 7 years ago
withNetworkConnectivity
HOCPublished by rgommezz almost 7 years ago
Published by rgommezz almost 7 years ago
Published by rgommezz about 7 years ago
Published by rgommezz over 7 years ago
withNetworkConnectivity
now receives and object as configuration instead of a single boolean parameter.Published by rgommezz over 7 years ago
meta
moved up one level in the Redux action, following standard flux action convention