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-tdlib

v2.2.1

Published

React Native wrapper for TDLib

Readme


Why

Building a Telegram client should not start with an hour-long TDLib compile. This library ships prebuilt TDLib binaries for iOS (xcframework, device + simulator) and Android (arm64-v8a, armeabi-v7a, x86_64), wraps the whole API in a single RN module, and streams every update to JS through NativeEventEmitter.

  • 🚀 51 first-class methods — auth, chats, messages, reactions, files, options, users.
  • 🔄 Real-time updates — new messages, typing, read receipts, download progress, reactions.
  • 🧩 Cross-platform parity — iOS and Android emit the same TDLib JSON shape. Write once.
  • 🟦 Fully typed.d.ts covers every method, event and result.
  • 📦 Zero native setup — no cmake, no brew install. pod install and go.
  • 🎬 Ships with a Telegram-like example app — auth wizard, chat list, message view, reactions, reply, typing.

Install

npm install react-native-tdlib
cd ios && pod install

Requires React Native ≥ 0.60 (autolinking), iOS ≥ 11, Android minSdk ≥ 21.

Hello, Telegram

import TdLib from 'react-native-tdlib';
import {NativeEventEmitter, NativeModules} from 'react-native';

const emitter = new NativeEventEmitter(NativeModules.TdLibModule);

// 1) Start TDLib
await TdLib.startTdLib({api_id: 12345, api_hash: 'your_hash'});

// 2) Listen for everything
emitter.addListener('tdlib-update', e => {
  if (e.type === 'updateNewMessage') {
    console.log('📨', JSON.parse(e.raw).message);
  }
});

// 3) Log in (drive via updateAuthorizationState — see docs)
await TdLib.login({countrycode: '+1', phoneNumber: '5551234567'});
await TdLib.verifyPhoneNumber('12345');

// 4) Load chats, send a message
await TdLib.loadChats(25);
const chats = JSON.parse(await TdLib.getChats(25));
await TdLib.sendMessage(chats[0].id, 'Hello from React Native!');

Example app

A full Telegram-like reference client ships under example/: login wizard, chat list with live updates, chat view with reactions, reply, typing indicator, photo previews, pagination.

git clone https://github.com/vladlenskiy/react-native-tdlib.git
cd react-native-tdlib/example && npm install
cd ios && pod install && cd ..
npx react-native run-ios       # or run-android

Documentation

Contributing

Pull requests welcome. See CONTRIBUTING.md for the local workflow.

Before submitting: npm test must pass and the example app must build on both platforms.

Community & support

Sponsor this project

Open source takes time. If this library saves you a week of wrestling with cmake and TDLib internals, consider supporting development:

Sponsors are listed in the CHANGELOG and on the repository homepage.

License

MIT © Vladlen Kaveev and contributors. TDLib itself is licensed under the Boost Software License.