A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
The react-native-exception-handler npm package is a module for React Native that enables developers to register a global error handler to capture both fatal and non-fatal uncaught exceptions. By using this module, developers can prevent their React Native apps from crashing abruptly without providing a graceful error message to users.
To install using yarn:
yarn add react-native-exception-handler
To install using npm:
npm i react-native-exception-handler --save
For automatic installation, run:
react-native link react-native-exception-handler
For manual installation on iOS:
ReactNativeExceptionHandler.xcodeproj to your XCode project.libReactNativeExceptionHandler.a to your project’s Build Phases.For manual installation on Android:
android/app/src/main/java/[...]/MainApplication.java.ReactNativeExceptionHandlerPackage() to the package list.android/settings.gradle and android/app/build.gradle with required dependencies.The react-native-exception-handler npm module is a valuable tool for React Native developers to handle errors and exceptions effectively, preventing apps from crashing abruptly. By providing features like a global error handler, support for unhandled native exceptions, and detailed installation instructions, this module simplifies the process of error handling in React Native applications.