@magic-sdk/react-native-bare 22.3.0-canary.665.6898360302.0 → 22.3.0-canary.665.6909002744.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -86,8 +86,17 @@ When attempting to import `Magic`, take note that the React Native metro bundler
86
86
  For this issue consider using Microsoft's [rnx-kit](https://microsoft.github.io/rnx-kit/docs/guides/bundling) suite of tools that include a plugin for metro that fixes this symlink related error.
87
87
 
88
88
  ### Handling internet connection problems
89
+ When an app is opened without internet connection, any request to the Magic SDK will result in a rejection with the following error:
90
+
91
+ ```json
92
+ {
93
+ "code": -32603,
94
+ "message": "Connection to Magic SDK not ready. Please check your internet connection."
95
+ }
96
+ ```
97
+
98
+ It is good practice to use [@react-native-community/netinfo](https://www.npmjs.com/package/@react-native-community/netinfo) to track the internet connection state of the device. For your convenience, we've also added a hook that uses this library behind the scenes:
89
99
 
90
- When the app has internet connectivity issues, the relayer might behave in ways you don't expect. That is why it is important to use [@react-native-community/netinfo](https://www.npmjs.com/package/@react-native-community/netinfo) to track the internet connection state of the device, and refresh your UI when the connection is re-established. For your convenience, we've also added a hook that uses this library behind the scenes:
91
100
 
92
101
  ```tsx
93
102
  import { useInternetConnection } from '@magic-sdk/react-native-expo';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-sdk/react-native-bare",
3
- "version": "22.3.0-canary.665.6898360302.0",
3
+ "version": "22.3.0-canary.665.6909002744.0",
4
4
  "description": "Passwordless authentication for React Native (Bare).",
5
5
  "author": "Magic Labs <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "types": "./dist/types/index.d.ts",
19
19
  "dependencies": {
20
20
  "@aveq-research/localforage-asyncstorage-driver": "^3.0.1",
21
- "@magic-sdk/commons": "17.3.0-canary.665.6898360302.0",
22
- "@magic-sdk/provider": "21.3.0-canary.665.6898360302.0",
21
+ "@magic-sdk/commons": "17.3.0-canary.665.6909002744.0",
22
+ "@magic-sdk/provider": "21.3.0-canary.665.6909002744.0",
23
23
  "@magic-sdk/types": "^17.2.0",
24
24
  "@react-native-async-storage/async-storage": "^1.15.5",
25
25
  "@types/lodash": "^4.14.158",
@@ -56,5 +56,5 @@
56
56
  "react-native-safe-area-context": ">=4.4.1",
57
57
  "react-native-webview": ">=12.4.0"
58
58
  },
59
- "gitHead": "172222bb6522c78f3f3b556210da249c193c022b"
59
+ "gitHead": "8ea311e43ffff16f35dc9bd7d208e2c6229cfc68"
60
60
  }