joshuapinter / react-native-unified-contacts

Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
MIT License
158 stars 56 forks source link

Promises instead of Callbacks. #68

Open joshuapinter opened 6 years ago

joshuapinter commented 6 years ago

Instead of having to do:

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.