react-native-offline

Handy toolbelt to deal nicely with offline/online connectivity in a React Native app. Smooth redux integration ✈️

MIT License

Downloads
43K
Stars
2.3K
Committers
45

Bot releases are hidden (Show)

react-native-offline - v6.0.1 Latest Release

Published by rgommezz over 1 year ago

Fixes a peer dependency issue with [email protected]

react-native-offline - v6.0.0

Published by rgommezz about 3 years ago

react-native-offline - v5.8.0

Published by rgommezz over 3 years ago

Added useIsConnected hook

react-native-offline - v5.7.0

Published by rgommezz over 4 years ago

What's new

  • Support for custom headers when pinging your own server
react-native-offline - v5.3.0

Published by rgommezz over 4 years ago

TypeScript Support 🚀

Rewriting the library with Typescript + exporting types to consumers

react-native-offline - v5.2.0

Published by rgommezz almost 5 years ago

Offline queue semaphore

Adds a mechanism control for the offline queue, in order to decide when to release it.

For that, createNetworkMiddleware now receives a new optional parameter, shouldDequeueSelector. See more here

react-native-offline - v5.1.0

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.

react-native-offline - v4.3.0

Published by rgommezz over 5 years ago

New features

createNetworkMiddleware

A new optional parameter has been added, queueReleaseThrottle. It allows you to interval the dispatches when flushing the offline queue. It defaults to 50ms.

react-native-offline - v4.1.0

Published by rgommezz almost 6 years ago

  • Fixes bug on iOS on checkInternetConnection
  • Added a 3rd optional parameter: shouldPing
  • Added documentation around it
react-native-offline - v4.0.0

Published by rgommezz almost 6 years ago

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.

image

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 with NetworkProvider and NetworkConsumer 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. Use NetworkConsumer from now on.

Redux integration

Utilities

  • checkInternetConnection Function params order has been reversed. Now 1st argument is the url and 2nd the timeout.
react-native-offline - v3.14.0

Published by rgommezz about 6 years ago

  • Use of https protocol across all components.
react-native-offline - v3.13.0

Published by rgommezz about 6 years ago

  • Flag to check internet connection regularly only when we are offline
  • Support for HEAD and OPTIONS as http methods for checking internet access
react-native-offline - v3.10.0

Published by rgommezz over 6 years ago

Exporting checkInternetConnection function to query internet access on demand

react-native-offline - v3.9.0

Published by rgommezz over 6 years ago

Adds ability to check for connectivity in background, defaults to false

react-native-offline - v3.7.0

Published by rgommezz almost 7 years ago

  • Saga to externalise connection change subscriptions, as an alternative to withNetworkConnectivity HOC
react-native-offline - v3.5.0

Published by rgommezz almost 7 years ago

  • Fixed issue of fetch requests never aborted
react-native-offline - v3.4.0

Published by rgommezz almost 7 years ago

  • Ability of checking internet connection periodically.
react-native-offline - v3.1.0

Published by rgommezz about 7 years ago

  • Fixes bug of thunks not intercepted in production
  • API changes for thunks
react-native-offline - v3.0.0

Published by rgommezz over 7 years ago

Breaking Changes

  • withNetworkConnectivity now receives and object as configuration instead of a single boolean parameter.

New Features

  • Internet access detection
  • Bug fixes
react-native-offline - v2.0.0

Published by rgommezz over 7 years ago

Breaking Changes

New Features

  • Possibility of dismissing an action from the offline queue, based on another action dispatched in between (like navigation to other screens related)
  • Flow typed
  • Bug fixes
Package Rankings
Top 2.1% on Npmjs.org
Badges
Extracted from project README
All Contributors CircleCI npm version Coverage Status npm issuehunt-image