Skip to main content
@avokjs/react-native is the React Native layer over @avokjs/core/engine. It keeps the dependency graph DOM-free and adds native platform adapters. See React Native setup.

Hooks

The same nine lifecycle hooks as @avokjs/react: useAvok, useSelfCustody, useAccount, useCreate, useLogin, useLogout, useEnroll, useExport, useAccessSlots, with identical signatures, plus usePairingCeremony.
There is no useAvokConnect on React Native; it is a web-only hook.
usePairingCeremony(opts) differs from the web version:
  • opts: { role: "import" | "export"; transport: PairingTransport }; transport is required (React Native ships no camera view).
  • The returned PairingCeremony has no qrRef/videoRef. It keeps phase, step, sas, error: string | null, canFinish, triggerScan(), retryCamera(), confirmSas(matches), and finish().

Provider

AvokProvider, props { client: UseOnlyAvokClient; children?: ReactNode }. Unlike the web package, children is optional here.

Factories and utilities

Re-exports

createNativeChannel and AuthSessionCancelledError from @avokjs/core/channel, plus the same catchable error classes as the web package. See Errors.