Create an Alert Library

During the previous week, we discovered a flaw in the alert library we use, Awesome Alert.

The user discovered last week that when he locks the device while the alert is promoting and unlocks it again, the alert abruptly vanishes. and that creates a significant issue because the user won’t be able to move on to next function where he must press the approve button because it has a callback function.

After numerous attempts, we determined that the issue is with the library itself, so I tried using a different library, but the same issue was discovered when locking and unlocking the device. As a result, we were unable to find a solution unless we used the default React Native Alert, which has a poor user interface.

I created a new component and attempted to create my own alert using features from the react native paper, such as modal, since the issue was with the react native model. Initially, I created an alert called “Okay” that only had one callback when the user clicked “Okay”, but later, I changed it to a library so that the developer could choose which alert he wanted to use, such as “Confirm” and “Cancel” or “Yes or No”, with their respective callback functions.

Leave a Reply