Exploring React Native has been quite a journey for me, especially when trying to implement a popup for error handling. Despite numerous attempts, I haven't been successful in getting it to work as desired. The code snippet below captures my current implementation:
import React, { useState, useEffect } from 'react'
import { Alert, Modal, TouchableOpacity, StyleSheet, View, Pressable } from 'react-native'
import { Text } from 'react-native-paper'
import Background from '../components/Background'
import Logo from '../components/Logo'
...
Despite deploying various libraries and utilities, I seem to be struggling with triggering a popup notification upon encountering errors. Although the API endpoint functions correctly by returning tokens or status codes like 403 and 503, incorporating effective error handling mechanisms remains elusive.
Having scoured various online resources for potential solutions, including leveraging Modals, Popups, and Alerts, I continue to face challenges in achieving the desired functionality within my React Native project.