Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: i18next/react-i18next
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.0.7
Choose a base ref
...
head repository: i18next/react-i18next
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.0.8
Choose a head ref
  • 3 commits
  • 6 files changed
  • 2 contributors

Commits on Mar 6, 2024

  1. fix: issue 1728 when useSuspense is false and default ns (#1731)

    is custom, in strict mode only, memoization is performed of an unready translation function and is not refreshed after readiness.
    
    The use of the isInitial ref is fundamentally incompatible with strict mode. Substituting ready instead seems to fix 1728 and keep both 1691 and 1718 fixed
    timheilman authored Mar 6, 2024
    Copy the full SHA
    a0c3d3e View commit details
  2. release

    adrai committed Mar 6, 2024
    Copy the full SHA
    be7640c View commit details
  3. 14.0.8

    adrai committed Mar 6, 2024
    Copy the full SHA
    dc9b7bb View commit details
Showing with 12 additions and 12 deletions.
  1. +4 −0 CHANGELOG.md
  2. +2 −2 package-lock.json
  3. +1 −1 package.json
  4. +2 −4 react-i18next.js
  5. +1 −1 react-i18next.min.js
  6. +2 −4 src/useTranslation.js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 14.0.8

- fix: issue [1728](https://github.com/i18next/react-i18next/issues/1728) when useSuspense is false and default ns [1731](https://github.com/i18next/react-i18next/pull/1731)

### 14.0.7

- try to get rid of internal interpolationOverride handling for Trans component, fixes [1729](https://github.com/i18next/react-i18next/issues/1729)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-i18next",
"version": "14.0.7",
"version": "14.0.8",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"types": "./index.d.mts",
6 changes: 2 additions & 4 deletions react-i18next.js
Original file line number Diff line number Diff line change
@@ -687,13 +687,11 @@
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
};
}, [i18n, joinedNS]);
const isInitial = react.useRef(true);
react.useEffect(() => {
if (isMounted.current && !isInitial.current) {
if (isMounted.current && ready) {
setT(getT);
}
isInitial.current = false;
}, [i18n, keyPrefix]);
}, [i18n, keyPrefix, ready]);
const ret = [t, i18n, ready];
ret.t = t;
ret.i18n = i18n;
Loading