https://github.com/anisjonischkeit/bs-react-native-contacts-android-only
https://github.com/anisjonischkeit/bs-react-native-contacts-android-only
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anisjonischkeit/bs-react-native-contacts-android-only
- Owner: anisjonischkeit
- Created: 2020-01-21T02:17:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:23:21.000Z (over 2 years ago)
- Last Synced: 2025-02-27T04:49:44.287Z (3 months ago)
- Language: C++
- Size: 2.23 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
π¨π¨THIS IS EXPERIMENTAL.π¨π¨
π¨π¨NOT ALL FEATURES WORK ON IOS.π¨π¨
IF YOU PLAN TO USE IOS AS A TARGET, USE [THIS](https://github.com/anisjonischkeit/bs-react-native-contacts).
The types are based on the index.d.ts spec found in the react-native-contacts project however I haven't tested the full surface area of this library so if you find any problems let me know.
# bs-react-native-contacts
[react-native-contacts](http://npm.im/react-native-contacts) bindings for [BuckleScript](https://bucklescript.github.io) in [Reason](https://reasonml.github.io).
# Installation
```
yarn add bs-react-native-contacts
```# Usage
Usage is the same as that of the [react-native-contacts](http://npm.im/react-native-contacts) library with a slight difference. Where the original library has callbacks that look like:
```javascript
Contacts.getAll((err, contacts) => {
if (err) {
throw err;
}
// you can now use contacts
});
```these bindings wrap the result in a result type:
```reasonml
open Belt.Result;Contacts.getAll(result => switch(result) {
| Ok(contacts) => // you can use contacts here
| Error(msg) => // you can see the error message here
})
```## Basic Usage
see [test/Example.re](test/Example.re)