Skip to content

Commit a656d2f

Browse files
authored
Update README.md
Fixes #107
1 parent 39efd69 commit a656d2f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
Handful of utilities you should keep in your toolbelt to handle offline/online connectivity in React Native. It supports iOS, Android and Windows platforms. You can leverage all the functionalities provided or just the ones that suits your needs, the modules are conveniently decoupled.
77

88
## Important (Please read)
9-
**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)**
10-
11-
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).**
12-
13-
That being said, if you still want to use v3, go [here](./docs_3x.md).
9+
**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-beta.0).**
1410

1511
## Contents
1612

@@ -75,7 +71,7 @@ This gives you the power to prioritize our work and support the project contribu
7571
## Installation
7672
This library supports React Native v0.55 or higher.
7773
```
78-
$ yarn add react-native-offline@4.0.0-beta.2
74+
$ yarn add react-native-offline@4.0.0
7975
```
8076

8177
#### Android
@@ -455,7 +451,9 @@ async function internetChecker(dispatch) {
455451
### FAQ
456452

457453
#### How to test offline behavior while actually being online
458-
You can use `pingServerUrl` and set it to a non existing url or point to some server that is down.
454+
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).
455+
456+
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.
459457

460458
#### How to orchestrate Redux to dispatch `CONNECTION_CHANGE` as the first action when the app starts up
461459
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.

0 commit comments

Comments
 (0)