Crash Reporting Event Handlers for React Native

Covered here is how to set up the event handlers that fire before every crash report is sent so a specific block of code is executed in your React Native app.

Before Sending a Report

This block is executed in the background before sending each report. It can be used for attaching logs and extra data to reports.

Instabug.onReportSubmitHandler(function () {
    // Attach logs and extra data to reports.
});

What’s Next

You can also set custom data, such as a user attribute, at any time, including inside event handlers. Logging user events in the event handlers is possible as well.