Skip to content

Commit 533f7f2

Browse files
Copilothotlong
andcommitted
Fix React Compiler memoization error in i18n provider
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 9bcfb47 commit 533f7f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/i18n/src/provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface I18nProviderProps {
4343
export function I18nProvider({ config, instance: externalInstance, children }: I18nProviderProps) {
4444
const i18nInstance = useMemo(
4545
() => externalInstance || createI18n(config),
46-
[externalInstance], // eslint-disable-line react-hooks/exhaustive-deps
46+
[externalInstance, config],
4747
);
4848

4949
const [language, setLanguage] = useState(i18nInstance.language || 'en');

0 commit comments

Comments
 (0)