You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,4 +71,54 @@ Please note that as of **v14.0.0** our React Native package offerings wrap the `
69
71
We have also added an optional `backgroundColor` prop to the `Relayer` to fix issues with `SafeAreaView` showing the background. By default, the background will be white. If you have changed the background color as part of your [custom branding setup](https://magic.link/docs/authentication/features/login-ui#configuration), make sure to pass your custom background color to `magic.Relayer`:
70
72
```tsx
71
73
<magic.RelayerbackgroundColor="#0000FF"/>
74
+
```
75
+
76
+
## 🙌🏾 Troubleshooting
77
+
78
+
### Symlinking in Monorepo w/ Metro
79
+
80
+
For React Native projects living within a **monorepo** that run into the following `TypeError: Undefined is not an object` error:
81
+
82
+
<imgwidth="299"alt="Screenshot 2022-11-23 at 12 19 19 PM"src="https://user-images.githubusercontent.com/13407884/203641477-ec2e472e-86dc-4a22-b54a-eb694001617e.png">
83
+
84
+
When attempting to import `Magic`, take note that the React Native metro bundler doesn’t work well with symlinks, which tend to be utilized by most package managers.
85
+
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
+
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 a `MagicSDKError`:
90
+
91
+
```json
92
+
{
93
+
"code": "MODAL_NOT_READY",
94
+
"rawMessage": "Modal is not ready."
95
+
}
96
+
```
97
+
98
+
99
+
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:
0 commit comments