Search code examples
react-nativereact-native-firebase

How to crash a react native android app


I am working on react-native-firebase crashlytics. I am using rnfirebase starter kit. There we have crashlytics integrated with the project. Now, I want to crash my app to check the crash report.


Solution

  • You need to import packages react-native-fabric and another line in initial file.

    import Fabric from 'react-native-fabric';
    
    var { Crashlytics } = Fabric;
    Crashlytics.crash();