That warning means your i18next instance has not been created (or has not finished initializing) before the first component tries to use useTranslation().
In an Expo app the most common causes are:
You never imported the file that calls i18next.init() (so the instance is never created).
You imported it after the first component that calls useTranslation() was rendered.
You switched to an asynchronous language detector (the one that reads from AsyncStorage) but you are still rendering components that call useTranslation()before the detector finishes.
Below is the minimal, bullet-proof pattern that removes the warning.
────────────────────────────────────────
Make sure the init file is imported first
────────────────────────────────────────
In your root entry file (usually App.js, App.tsx, or index.js) put the import at the very top, before anything else:
js
// App.js
import './src/i18n'; // ← FIRST LINE – creates the i18next instance
import React from 'react';
import { SafeAreaView } from 'react-native';
import RootNavigator from './src/navigation/RootNavigator';
export default function App() {
return (
<SafeAreaView style={{ flex: 1 }}>
<RootNavigator />
</SafeAreaView>
);
}
────────────────────────────────────────
2. If you use an async detector, wait for it
────────────────────────────────────────
When you added the custom languageDetector that reads from AsyncStorage, i18next.init() becomes asynchronous.
Tell React to wait until the instance is ready before rendering the UI.
Update your entry file:
js
// App.js
import './src/i18n'; // still first
import React, { useEffect, useState } from 'react';
import { I18nextProvider } from 'react-i18next';
import i18n from './src/i18n'; // import the same instance
import { SafeAreaView } from 'react-native';
import RootNavigator from './src/navigation/RootNavigator';
export default function App() {
const [i18nReady, setI18nReady] = useState(false);
useEffect(() => {
// i18next exposes a promise when using async plugins
i18n.init().then(() => setI18nReady(true));
}, []);
if (!i18nReady) {
return null; // or a splash screen / loading spinner
}
return (
<I18nextProvider i18n={i18n}>
<SafeAreaView style={{ flex: 1 }}>
<RootNavigator />
</SafeAreaView>
</I18nextProvider>
);
}