diff --git a/packages/@react-aria/i18n/src/context.tsx b/packages/@react-aria/i18n/src/context.tsx index 45a5ad0bf2c..d07aaab8071 100644 --- a/packages/@react-aria/i18n/src/context.tsx +++ b/packages/@react-aria/i18n/src/context.tsx @@ -30,10 +30,16 @@ export function I18nProvider(props: I18nProviderProps) { let {locale, children} = props; let defaultLocale = useDefaultLocale(); - let value: Locale = locale ? { - locale, - direction: isRTL(locale) ? 'rtl' : 'ltr' - } : defaultLocale; + let value: Locale = React.useMemo(() => { + if (!locale) { + return defaultLocale; + } + + return { + locale, + direction: isRTL(locale) ? 'rtl' : 'ltr' + }; + }, [defaultLocale, locale]); return (