Reputation: 9587
I was wondering if it is possible to dismiss an Alert
in React-Native from the main application itself, programmatically?
As an example, my application shows an Alert. When the user stays on that screen for a while and the session of the app expires, the user gets redirected to the login screen but the Alert stays open and I'd like to close it while this happen.
Is there a way to do something like this?
Thanks
Upvotes: 6
Views: 1405
Reputation: 761
You can't. You have to use a custom alert box or a modal and than close it if needed.
Upvotes: 4