Sourced from react-i18next's changelog.
17.1.9
- fix(useTranslation): namespaces added to or removed from the
nsarray are now picked up. The hook used the array itself as theuseMemodependency list, and React only compares the entries both lists have in common when its length changes, so going fromuseTranslation(['nsA'])touseTranslation(['nsA', 'nsB'])kept returning['nsA']: React warned that the dependency array changed size,nsBwas never loaded, and withnsMode: 'fallback'keys only innsBrendered as the key. Removing a namespace kept the old list the same way. The namespaces are now compared by content, so a growing list loads the new namespace (suspending until it is loaded, as switching from'nsA'to'nsB'already does) andtuses it. Lists that keep their length behave as before. Thanks@​lprnmns(#1945).