React SDK Reference
This is the definitive source for everything exposed by @orga-ai/react—hooks, components, and exported types. Use it when you need prop names, return signatures, or version requirements; tutorials and walkthroughs live elsewhere.
Sections
- Hooks —
useOrgaAI()contract for session control, media, and configuration. - Components —
<OrgaAIProvider>,<OrgaAudio>,<OrgaVideo>primitives for context and media rendering. - Types — TypeScript interfaces and enums exported from
@orga-ai/react.
đź’ˇ Tip:
The React SDK mirrors the design of the React Native SDK. If you plan to target both web and mobile, your app logic can often be shared directly between@orga‑ai/reactand@orga‑ai/react‑native.
Structure
Each reference page includes:
- Concise descriptions of the API surface.
- Code examples using TypeScript / JSX.
- Detailed tables describing props, return values, and parameters.
- Implementation notes around lifecycle, state, and performance.
Runtime requirements
| Requirement | Description |
|---|---|
| React ≥18.2 | Required for concurrent‑safe context and hooks. |
| Browser support | Uses WebRTC (RTCPeerConnection, MediaStream) and the Permissions API. |
| Bundlers | Works with Vite, Next.js, CRA, and custom Webpack setups. Make sure your bundler resolves exports maps. |
| Backend integration | A backend service (Server SDK or REST proxy) must issue ephemeral tokens for every session. |
Never expose your Orga API key in browser code. Issue tokens via a backend built with the Node Server SDK.
Versioning
All Orga SDKs follow semantic versioning (SemVer).
Breaking API changes correspond to major version bumps (e.g., 1.x → 2.x).
The React SDK’s current stable version is v1.0.5 (open beta).
Related material
- React tutorial – end-to-end setup guide.
- React architecture explanation – context flow and design.
- React troubleshooting how-to – error-focused fixes.
Next Steps
Last updated on