Quick start
Add the package and go.
Install from npm, pnpm, or yarn. If you want to test model downloads or GGUF export before you ship the app build, use Onde CLI. If you want the broader case for local inference, read The Latency War.
npm install @ondeinference/react-native
# or
pnpm add @ondeinference/react-native
# or
yarn add @ondeinference/react-native
Usage
Load. Prompt. Render.
The JavaScript API stays small because it should. Load the default model, send a message, and render the result in your app.
import { OndeChatEngine } from '@ondeinference/react-native';
// OndeChatEngine is a singleton: call its methods directly.
await OndeChatEngine.loadDefaultModel('You are a helpful assistant.');
const result = await OndeChatEngine.sendMessage('Hello!');
console.log(result.text);
Coverage
iPhone and Android are the main targets here. If you want to see the live telemetry side, open Onde Inference Pulse.
PlatformABI / sliceStatus
iOSarm64 device, arm64 simulatorReady
Androidarm64Ready
FAQ
Frequently asked questions.
The same answers, with the install and quick-start code, are in a markdown version of this page for agents and tools that read text.
How do I add Onde to a React Native app?
Install @ondeinference/react-native with npm, pnpm or yarn. It is an Expo module and needs Expo SDK 52 or newer. Import OndeChatEngine, call loadDefaultModel, then sendMessage.
Which platforms does the React Native SDK support?
iOS (arm64 device and simulator) and Android (arm64). The JavaScript layer is thin; inference runs in the native Onde engine.
Which model loads by default?
loadDefaultModel loads Qwen 2.5 Coder 1.5B (about 941 MB, Q4_K_M) on iPhone and Android.
Does the React Native SDK stream tokens?
Not in 1.5.0. sendMessage resolves with the complete InferenceResult and adds the turn to history, and generate runs a one-shot prompt without touching history. Token streaming is available in the Swift, Kotlin, Dart and Rust SDKs.
Does the React Native SDK need a network connection?
Only for the first model download. The model is fetched from Hugging Face the first time it loads and cached on the device. After that, inference runs on the device with no network request, and prompts never leave it.
Is the React Native SDK free and open source?
Yes. @ondeinference/react-native is free and dual-licensed under MIT and Apache 2.0. The engine source is at github.com/ondeinference/onde.