1.0.1 • Published 2 years ago

react-native-error-boundary-alert v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

nameProptypesDescription
goBack *funcvoid
handleError *funcvoid
children *Nodecomponent 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: shmuelpick1999@gmail.com