We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89c9698 commit 55f183dCopy full SHA for 55f183d
packages/use-i18n/src/usei18n.tsx
@@ -93,7 +93,7 @@ export const useI18n = (): Context => {
93
return context
94
}
95
96
-export const useTranslation = (namespaces: string[] = [], load: LoadTranslationsFn): Context & { isLoaded: boolean } => {
+export const useTranslation = (namespaces: string[] = [], load?: LoadTranslationsFn): Context & { isLoaded: boolean } => {
97
const context = useContext(I18nContext)
98
if (context === undefined) {
99
throw new Error('useTranslation must be used within a I18nProvider')
0 commit comments