We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afcaea4 commit 8aa8a29Copy full SHA for 8aa8a29
2 files changed
lib/components/Provider.js
@@ -46,10 +46,10 @@ export default class Provider extends React.Component<PropsType> {
46
}
47
48
49
- componentWillReceiveProps(nextProps: PropsType) {
+ componentDidUpdate(prevProps: PropsType) {
50
if (
51
- this.props.language !== nextProps.language ||
52
- this.props.translation !== nextProps.translation
+ prevProps.language !== this.props.language ||
+ prevProps.translation !== this.props.translation
53
) {
54
this.notify()
55
lib/components/createSubscribe.js
@@ -19,7 +19,7 @@ const createSubscribe: createSubscribeType = ({ Component }) =>
19
20
unsubscribe: () => void
21
22
- componentWillMount() {
+ componentDidMount() {
23
this.unsubscribe = this.context.translated.subscribe(() =>
24
this.forceUpdate(),
25
)
0 commit comments