You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7363ef7
Browse filesBrowse the repository at this point in the historyBrowse files
// Memoize the translation function to prevent unnecessary re-renders
36
-
// Note: i18n.language must be included as a dependency so that the
37
-
// translate function is recreated when the language changes. Without
38
-
// this, React Compiler / React.memo consumers will cache stale
39
-
// translations because the i18n object reference never changes.
40
-
/* eslint-disable react-hooks/exhaustive-deps */
41
-
// i18n.language must be included: i18n is a singleton whose reference
42
-
// never changes, but language changes via changeLanguage()
36
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- i18n is a stable singleton; i18n.language must be listed explicitly to bust the memo on locale change
0 commit comments