# Onde React Native SDK

> @ondeinference/react-native is the React Native package for Onde Inference. It runs GGUF language models on the device in iPhone and Android apps through a native engine, built as an Expo module. Current release: 1.5.0. Dual-licensed MIT and Apache 2.0.

- Web page: https://ondeinference.com/sdk/react-native
- npm: https://www.npmjs.com/package/@ondeinference/react-native
- Source: https://github.com/ondeinference/onde

## Install

```sh
npm install @ondeinference/react-native
# or
pnpm add @ondeinference/react-native
# or
yarn add @ondeinference/react-native
```

## Quick start

```ts
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);
```

## FAQ

### 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.
