Sourced from react-i18next's changelog.
17.0.14
- fix: the
i18nobject returned byuseTranslationwas only refreshed wheni18n.languagechanged, so aresolvedLanguage(orlanguages) change of its own kept handing components the previous snapshot. That happens whenever the translations for the current language arrive after the switch — i18next resolves to the fallback until its store has them — and components readingi18n.resolvedLanguage(language switchers, for example) then stayed one switch behind. The cached wrapper is now keyed on all three language fields, which are exactly the ones the surroundinguseMemoalready depends on; wrapper identity still only changes when the language state does, so the caching from #1885 is unaffected. Reported via next-i18next#2348.
5f8c5f9
17.0.146def81a
fix: refresh the returned i18n wrapper when resolvedLanguage
changesf37ea87
docs: "For AI assistants" paragraph in the READMEe0592ba
chore: keep dev-only and local files out of the npm package