/** * Sample React Native App * https://github.com/facebook/react-native * * @format */ import React from 'react' import type {PropsWithChildren} from 'react' import { Button, SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, Platform, View, } from 'react-native' // Setup Bugsnag client to capture errors automatically import Bugsnag from '@bugsnag/react-native' Bugsnag.start() const bogusObject = {} as any function triggerException() { bogusObject.bogusFunction() } function triggerHandledException() { bogusObject.bogusHandledFunction() } async function triggerPromiseRejection() { // try { // await NativeModules.CrashyCrashy.generatePromiseRejection() // } catch (e: any) { // Bugsnag.notify(e) // } } function triggerNativeException() { // NativeModules.CrashyCrashy.generateCrash() } function triggerNativeHandledError() { // NativeModules.CrashyCrashy.handledError() } type SectionProps = PropsWithChildren<{ title: string }> function App(): JSX.Element { return ( <> {global.HermesInternal == null ? null : ( Engine: Hermes ({global.__turboModuleProxy != null ? 'Turbo' : 'Native'} Modules) )} Press the buttons below to test examples of Bugsnag functionality. Make sure you have changed the API key in Info.plist or AndroidManifest.xml.