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
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ This callback is also called when Proof Point Details Modal is shown. This happe
206
206
207
207
You should pass your function to `onResized` prop. It should take the `height` argument and adjust your overlay component so that Bundle have enough space to display the content.
208
208
209
-
#### What if I need to add marging around the bundle?
209
+
#### What if I need to add margin around the bundle?
210
210
211
211
Just add it to the `getBundleLoadingHeight` and `height` in `onResized` callback. Let's say you want to have more space between head of your BottomSheet and from the bottom of the screen. You could do something like:
212
212
@@ -240,6 +240,24 @@ Just add it to the `getBundleLoadingHeight` and `height` in `onResized` callback
240
240
/>
241
241
```
242
242
243
+
#### Error handling
244
+
245
+
You may want to handle cases when HTTP request fails due to network issues or similar. For this you could register the `onError` callback when you call `configure`.
246
+
247
+
```
248
+
import { configure } from "@provenance/react-native-provenance";
249
+
250
+
configure({
251
+
apiKey: process.env.EXPO_PUBLIC_API_KEY,
252
+
bundleId: process.env.EXPO_PUBLIC_BUNDLE_ID,
253
+
onError: (error: string|Error) => {
254
+
// your custom error handling logic here...
255
+
// report it to you error tracking software
256
+
// or hide the container components etc.
257
+
}
258
+
});
259
+
```
260
+
243
261
## Contributing
244
262
245
263
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
0 commit comments