Skip to content

Commit

Permalink
remove i18n check in provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Nov 6, 2018
1 parent 6375bab commit 022b9aa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 8.3.6

- remove componentWillReceiveProps call in I18nextProvider to comply with react strict mode [596](https://github.com/i18next/react-i18next/pull/596)

### 8.3.5

- rename named export to window.ReactI18next for standalone js
Expand Down
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": "8.3.5",
"version": "8.3.6",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"types": "index.d.ts",
Expand Down
6 changes: 0 additions & 6 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -2574,12 +2574,6 @@
initSSR(props, true);
}

componentWillReceiveProps(nextProps) {
if (this.props.i18n !== nextProps.i18n) {
throw new Error('[react-i18next][I18nextProvider]does not support changing the i18n object.');
}
}

render() {
const _this$props = this.props,
children = _this$props.children,
Expand Down
2 changes: 1 addition & 1 deletion react-i18next.min.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/I18nextProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ export class I18nextProvider extends Component {
initSSR(props, true);
}

componentWillReceiveProps(nextProps) {
if (this.props.i18n !== nextProps.i18n) {
throw new Error('[react-i18next][I18nextProvider]does not support changing the i18n object.');
}
}

render() {
const { children, i18n, defaultNS, reportNS } = this.props;

Expand Down
19 changes: 0 additions & 19 deletions test/i18nextProvider.spec.js

This file was deleted.

0 comments on commit 022b9aa

Please sign in to comment.