Skip to content
Advertisement

Possible Unhandled Promise Rejection (id:0) Warning

I am getting the following warning message when my AsyncStorage Item is empty “Possible Unhandled Promise Rejection (id:0)” So my question is: How can I handle a promise rejection?

My code:

JavaScript

Advertisement

Answer

You need to catch the reject of the promise:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement