Skip to content

v4.0.0

Compare
Choose a tag to compare
@rgommezz rgommezz released this 26 Dec 23:54
a656d2f

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.