Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Mar 8, 2021
1 parent 13c95ce commit 5215a4d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 11.8.9

- Fix allow to replace i18n in provider with useTranslation hook [1273](https://github.com/i18next/react-i18next/pull/1273)

### 11.8.8

- typescript: Allow `TFuncKey` to be used without specifying the namespace, in the same way TFunction and useTranslation work [1262](https://github.com/i18next/react-i18next/pull/1262)
Expand Down
10 changes: 9 additions & 1 deletion react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,15 @@
return i18n.store.off(e, boundReset);
});
};
}, [namespaces.join()]);
}, [i18n, namespaces.join()]);
var isInitial = React.useRef(true);
React.useEffect(function () {
if (isMounted.current && !isInitial.current) {
setT(getT());
}

isInitial.current = false;
}, [i18n]);
var ret = [t.t, i18n, ready];
ret.t = t.t;
ret.i18n = i18n;
Expand Down
Loading

0 comments on commit 5215a4d

Please sign in to comment.