npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-fast-contacts

v0.1.0

Published

Fastest contact fetcher for React Native

Readme

react-native-fast-contacts

🚀 Modern, high-performance contact fetcher for React Native. Built from the ground up using Turbo Modules (New Architecture) for maximum speed and efficiency.

A high-performance implementation using JSI (JavaScript Interface) that enables fetching the entire contact list with zero serialization overhead, bypassing the legacy bridge for maximum speed.

Compatibility & Requirements

This library is optimized for the React Native New Architecture and is forward-compatible with the latest versions.

Minimum Requirements

| Dependency | Version | | --- | --- | | React | >= 18.0.0 (Supports React 19) | | React Native | >= 0.71.0 (Optimized for 0.83+) | | iOS | 13.0+ | | Android | API 24+ |

Note: This library requires the New Architecture to be enabled for best performance.

How It Works

react-native-fast-contacts accesses the device contact database directly from native code:

  • iOS: Uses the Contacts framework (Objective-C++).
  • Android: Uses ContentResolver (Kotlin).

Key Advantages:

  • Zero JS Overhead: Contacts are parsed natively and passed as a ready-to-use array.
  • 🔋 Battery Efficient: Optimized native queries reduce CPU usage.
  • 🧹 Sanitized Data: Automatically cleans phone numbers (removes spaces, dashes, etc.).
  • 🖼️ Thumbnail Support: High-speed retrieval of contact avatars in Base64.

Installation

npm install react-native-fast-contacts
# or
yarn add react-native-fast-contacts

iOS Setup

  1. Add the following key to your Info.plist:
<key>NSContactsUsageDescription</key>
<string>This app requires access to your contacts to let you connect with friends.</string>
  1. Install pods:
cd ios && pod install

Android Setup

The READ_CONTACTS permission is handled automatically. However, you must request it at runtime as per Android guidelines.

Usage

import React, { useEffect, useState } from 'react';
import { PermissionsAndroid, Platform, FlatList, Text } from 'react-native';
import { getContacts, type Contact } from 'react-native-fast-contacts';

export default function App() {
  const [contacts, setContacts] = useState<Contact[]>([]);

  const requestPermission = async () => {
    if (Platform.OS === 'android') {
      const granted = await PermissionsAndroid.request(
        PermissionsAndroid.PERMISSIONS.READ_CONTACTS
      );
      return granted === PermissionsAndroid.RESULTS.GRANTED;
    }
    return true;
  };

  useEffect(() => {
    const loadContacts = async () => {
      const hasPermission = await requestPermission();
      if (hasPermission) {
        try {
          const list = await getContacts();
          setContacts(list);
        } catch (error) {
          console.error("Failed to fetch contacts:", error);
        }
      }
    };

    loadContacts();
  }, []);

  return (
    <FlatList
      data={contacts}
      keyExtractor={(item, index) => index.toString()}
      renderItem={({ item }) => (
        <Text>{item.name}: {item.number}</Text>
      )}
    />
  );
}

Data Structure

| Field | Type | Description | | --- | --- | --- | | name | string | Full name (Given + Family name) | | number | string | Sanitized phone number (digits only) | | email | string | Primary email address (if available) | | thumbnail | string | Base64 encoded PNG image data URI |


License

MIT