If my React Native app fails to connect to its backend, I show an Alert with an OK button. If this happens, there\'s no point in the app continuing to run, so I\'d like to s
Write a native module that performs the following actions when called:
IOS:
exit(9);
ANDROID:
((YourApplication) self.getApplicationContext()).kill();
...EDIT...
Or just use the one I created: https://www.npmjs.com/package/react-native-exit-app