getContacts( contacts => {
// Do something with contacts.
}
You can now do:
contacts = await getContacts();
// Do something with contacts.
So much cleaner.
And to be clear, we will not be supporting callbacks alongside Promises. We will be removing the typical callbacks in favour of Promises. They are the present and the future.
Instead of having to do:
You can now do:
So much cleaner.
And to be clear, we will not be supporting callbacks alongside Promises. We will be removing the typical callbacks in favour of Promises. They are the present and the future.