How to manually log errors/crashes to appcenter in react native application?

Viewed 263

I am creating an application with the use of react native and I want to handle exceptions in some cases when an application can get crashed. I want to show that exception in appcenter and also not want that the application actually crash. I am using appcenter already and implemented it for building the app. I am also getting crash reports there but it shows when the actual application got crashed. But I want only the reports there while not crashing the application.

1 Answers

you can use appcenter-analytics and appcenter-crashes

If you use the library, you can find out when a crash occurs.

  • appcenter

enter image description here

To manage the event separately, the following method can be used.

  • Example
import Analytics from "appcenter-analytics";
...
Analytics.trackEvent("eventName", {
               [key]: value,
            });
  • appcenter

enter image description here

Related