react-native-error-boundary-alert
v1.0.1
Published
Uses react-native-error-boundary package and add custom alert on fallback with retry and cancel option.
Downloads
8
Maintainers
Readme
Uses react-native-error-boundary package and add custom alert on fallback with retry and cancel option.
Installation
yarn add react-native-error-boundary-alert
or
npm i react-native-error-boundary-alert --save
API
CustomErrorBoundary
isRequired if there is a * in the name field
|name|Proptypes|Description| ----|----|-----| |goBack *|func|void |handleError *|func|void |children *|Node|component elements content
Example
import CustomErrorBoundary from 'react-native-error-boundary-alert';
const handleError = (error) => {
console.error(error);
};
const goBack = () => {
// React native navigation
navigation.goBack();
};
<CustomErrorBoundary goBack={goBack} handleError={handleError}>
<Text>My component..</Text>
</CustomErrorBoundary>
Contact
gmail: [email protected]