Skip to documentation
DocumentationSDKs and frameworks

React Native

Connect native i18next rendering to published translations, persistent cache, and runtime variants.

Documented SDK 1.6.0

Requirements: React Native 0.74+, React 18+, i18next 23+, react-i18next 14+

Package reference
On this page

Install and prepare native storage

Terminal

npm install @rerune/react-native@1.6.0 i18next react-i18next

The SDK includes AsyncStorage 2.x as a dependency. Its native module must be present in the application binary through your React Native or Expo native dependency setup. Rebuild a development or release client when adding the module. Translation updates cannot install native modules.

Keep local translation resources for first-run offline behavior. Configure i18next with the languages and namespaces your application needs. OTA updates target the translation namespace.

Initialize once before mounting

Use the same nativeOptions shape shown in the React chapter, including your existing resources, fallback language, and interpolation settings. Replace native i18next initialization with the awaited setup in your existing asynchronous startup.

TypeScript · native startup

import { ReRune } from '@rerune/react-native'

const client = await ReRune.setup({
  otaPublishId: '<READ_ONLY_OTA_PUBLISH_ID>',
}, nativeOptions)

TSX · root provider

import { ReRuneProvider } from '@rerune/react-native'

<ReRuneProvider client={client} defaultNS="translation">
  <App />
</ReRuneProvider>

TSX · native component

import { Text } from 'react-native'
import { useTranslation } from 'react-i18next'

export function App() {
  const { t } = useTranslation()
  return <Text>{t('headline')}</Text>
}

Language selection and cached text

Keep the application language selection in your existing i18next flow. Use the SDK runtime locale information when offering dashboard-managed languages. A configured native supportedLngs list can restrict selection even when a locale bundle has been downloaded.

AsyncStorage can retain successfully fetched content across restarts. If a built-in store write fails, the SDK can still apply the update in session memory; that fallback does not survive a restart. Clearing application storage also removes cached data. Test a fresh offline installation separately from an offline restart after a successful persisted update.

Platform reference

The linked Expo example pins SDK 1.6.0 and demonstrates native startup, runtime languages, variants, and manual refresh. Use the package README for the version-specific API reference. Example font and artwork dependencies are not SDK requirements.