React Native SDK
Use LiteP2P from React Native with native bridges for iOS and Android.
Install
npm install @litep2p/react-native
# iOS
cd ios && pod install
Quick start
// pseudo TS
import { LiteP2P, PeerConfig } from '@litep2p/react-native';
const p2p = new LiteP2P(new PeerConfig({ appId: 'your-app-id' }));
await p2p.connect();
Lifecycle tips
- Disconnect on app background unless you have a background strategy.
- Use a single instance per app session.
- See Android foreground services and iOS background modes.