New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More β†’
Socket
Sign inDemoInstall
Socket

react-native-offline

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-offline - npm Package Compare versions

Comparing version 4.0.0-beta.2 to 4.0.0

2

package.json
{
"name": "react-native-offline",
"version": "4.0.0-beta.2",
"version": "4.0.0",
"description": "Handy toolbelt to deal with offline mode in React Native applications. Cross-platform, provides a smooth redux integration.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -9,8 +9,4 @@ # react-native-offline

## Important (Please read)
**This is the documentation for version 4.0.0-beta.2. If you are migrating from v3 to v4, check the [release notes](https://github.com/rgommezz/react-native-offline/releases/tag/v4.0.0-beta.0)**
**This is the documentation for version 4.0.0. If you are migrating from v3 to v4, check the [release notes](https://github.com/rgommezz/react-native-offline/releases/tag/v4.0.0).**
Please try to use v4. Some of the core has been rewritten from scratch using TDD approach and it fixes some of the outstanding [issues](https://github.com/rgommezz/react-native-offline/pull/141) that v3 presented. If you are using RN v0.56 or higher v3 won't work. Don't be misled by the word *beta*, it's a precaution measure that I've set myself because I am human and I may have made some unwitting mistake :robot:. It'd be appreciated to gather feedback early on to draft the final *stable* release. Also, an example application is coming soon to better illustrate real case scenarios of usage of the library. **Check out the [installation details](#installation).**
That being said, if you still want to use v3, go [here](./docs_3x.md).
## Contents

@@ -79,3 +75,3 @@

```
$ yarn add react-native-offline@4.0.0-beta.2
$ yarn add react-native-offline@4.0.0
```

@@ -460,4 +456,6 @@

#### How to test offline behavior while actually being online
You can use `pingServerUrl` and set it to a non existing url or point to some server that is down.
You can use `pingServerUrl` and set it to a non existing url or point to some server that is down. Don't forget to also set `shouldPing` to `true` (which is the default behaviour).
Don't rely too much on iOS simulators and switching on/off the internet connection on your computer, they are quite buggy and report inconsistent connectivity information. On the other hand, testing on real devices should be fine.
#### How to orchestrate Redux to dispatch `CONNECTION_CHANGE` as the first action when the app starts up

@@ -464,0 +462,0 @@ The solution involves using some local state in your top most component and tweaking the `configureStore` function a bit, so that it can notify your root React component to render the whole application when the required initialisation has taken place. In this case, by initialisation, we are talking about rehydrating the store from disk and detecting initial internet connection.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc