You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function showExceptionModal(error) { Alert.alert( "Oops...", "It looks like something went wrong and we will need to restart the app.", [ { text: "Restart", onPress: () => { RNRestart.Restart() }, }, { text: "Logout", onPress: () => { AsyncStorage.setItem(REFRESH_TOKEN, "") RNRestart.Restart() }, }, ] ) }
The text was updated successfully, but these errors were encountered:
Trying to use in conjunction with react-native-restart however once the app has crashed. None of the buttons work.
setJSExceptionHandler((error, isFatal) => { jsExceptionHandler(error, isFatal) })
function jsExceptionHandler(error, isFatal = true) { const msg = access(error, "message") ||
Unknown Error: ${JSON.stringify(error, Object.getOwnPropertyNames(error))}if (isFatal) { showExceptionModal(msg) } }
function showExceptionModal(error) { Alert.alert( "Oops...", "It looks like something went wrong and we will need to restart the app.", [ { text: "Restart", onPress: () => { RNRestart.Restart() }, }, { text: "Logout", onPress: () => { AsyncStorage.setItem(REFRESH_TOKEN, "") RNRestart.Restart() }, }, ] ) }
The text was updated successfully, but these errors were encountered: