
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-jsi-contacts
Advanced tools
The current react-native-contacts library uses the React Native Bridge to convert the native Java/Objective-C types to JavaScript values. This is asynchronous, batched, and serializes the huge contacts list in the native world (write into WritableArray/WritableMap, then let the Bridge convert to JSON), then deserializes it on the JavaScript side using JSON. It is therefore slow.
react-native-jsi-contacts uses JSI to be way faster.
jsi::HostObject lazy-get)⚠️ react-native-jsi-contacts only works on Android. If you want me to implement iOS support, consider funding the project.
The library uses almost the same native "getContacts()" function as react-native-contacts (minor tweaks to not use the Bridge types WritableArray/WritableMap), so the only difference is the conversion speed.
For 25 contacts, I have measured an average speed increase of ~35%, this greatly scales with the amount of contacts you have though.
LOG JSI: Contacts Permission: granted
LOG JSI: Got: 25 contacts in 55.14947900176048ms.
LOG Bridge: Contacts Permission: granted
LOG Bridge: Got: 25 contacts in 74.15260401368141ms.
For 25 contacts, the conversion between the native Java Contacts list and the JavaScript Contacts list takes only ~3 milliseconds!
Install using npm/yarn
npm install react-native-jsi-contacts
Add this code:
JsiContactsModule.install(reactApplicationContext);
to your JSIModulePackage's getJSIModules method. See the react-native-mmkv installation guide on how to create a JSIModulePackage.
This project is sponsored by Galaxycard.
Get a list of all contacts:
import { getContactsAsync } from "react-native-jsi-contacts";
const contacts = await getContactsAsync();
Get a hashsum to compare for any changes in the contact book:
import { getHashAsync } from "react-native-jsi-contacts";
import { MMKV } from "react-native-mmkv";
const storage = new MMKV();
const hash = await getHashAsync();
const previousHash = storage.getString("contactsHash")
if (previousHash !== hash) {
// get all contacts and reload hash now.
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
getContacts()" implementationFAQs
A contacts library for React Native using JSI
We found that react-native-jsi-contacts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.