Can't detect i18n.language changes in componentDidUpdate or shouldComponentUpdate #831

@richardhsueh

Description

Describe the bug
There is a function that i need to trigger based on the language changes, but some how I can't detect the changes in componentDidUpdate or shouldComponentUpdate . And I tried to console log this.props.i18n.language and prevProps.i18n.language , they are just the same

Occurs in react-i18next version
v.10.7.0

To Reproduce
Here is a codesandbox example https://codesandbox.io/s/62v094rj6z .
You can look at the Homepage.js
This one is a simplified version, but I think it can still demonstrate the idea that it can't detect the props changes in lifecycle event

Expected behaviour
In the codesandbox example, the Homepage component should update normally when i click on the links.

OS (please complete the following information):

  • Device: [e.g. MBP 2017 13"]
  • Browser: [e.g. Chrome 73.0.3683.103]
  •