Skip to content

An example repo showing how to integrate react-native-exception-handler

Notifications You must be signed in to change notification settings

a7ul/react-native-exception-handler-example

Repository files navigation

React Native Exception handler example

This is an example repo This repo contains a basic react native app boilerplate code.

I have integrated both JS Exception handler and Native exception handler here to showcase how to integrate the library.

The details of how the libarary works and integration can be found here:

https://github.com/master-atul/react-native-exception-handler

To run the app:

  1. git clone https://github.com/master-atul/react-native-exception-handler-example
  2. yarn install
  3. react-native run-ios --configuration Release or react-native run-android --variant=release

JS Exceptions can be caught even when running in development mode, Since I have enabled Catching JS Exceptions during development. So for JS exceptions you can run react-native run-ios or react-native run-android.

Hence if you click on Cause JS Exception Button, you should see the error been caught straight away.

In case of native exceptions . You would need to run the app in the bundled mode using:

react-native run-ios --configuration Release

For Android you can run it using:

react-native run-android --variant=release

This runs the app on simulator in release configuration.

Few screenshots

  1. App launch:


  1. JS Exception:


  1. Native Exception:


Hope this helps people !! ✌🏻🌮

About

An example repo showing how to integrate react-native-exception-handler

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published