Skip to content
oRPC
Esc
navigateopen⌘Jpreview
On this page

React Native Adapter

This guide explains how to use oRPC with React Native, including the platform’s supported features and current limitations.

React Native provides a built-in Fetch API, allowing you to connect to an oRPC server over HTTP. Learn more in the Fetch Client Adapter documentation.

import { RPCLink } from '@orpc/client/fetch'

const link = new RPCLink({
  origin: 'https://api.example.com',
  url: '/rpc',
  headers: async ({ context }) => ({
    'x-api-key': context?.something ?? ''
  })
})

Limitations

The built-in fetch implementation in React Native does not support File/Blob/ReadableStream<Uint8Array> or AsyncIteratorObject. Follow Support Stream #27741 for progress.

If you’re using Expo SDK 56 or later, with expo/fetch, you can:

React Native also provides built-in WebSocket support, allowing you to connect to an oRPC server over WebSocket. Learn more in the WebSocket Client Adapter documentation.

import { RPCLink } from '@orpc/client/websocket'

const link = new RPCLink({
  connect: () => new WebSocket('ws://localhost:3000'),
})

Last updated on August 6, 2026

Was this page helpful?