TypeError: this.props.t is not a function
See original GitHub issueWe have a web app bootstrapped with create-react-app
and are using react-i18next
to manage translations. We are constantly seeing errors about t
function being undefined. This is being reported many times per day by our error tracking system and it occurs only on Android devices.
We have not been able to reproduce it by ourselves, but it happens to users with Android phones all the time.
Example error:
TypeError: this.props.t is not a function
File "containers/ReviewContainer.js" line 106 col 34 in t.value
<Header1>{this.props.t('review.title')}</Header1>
We have done lots of investigation around this issue, but haven’t found any solutions. t
function is used in a very standard way through translate
HOC and we have tried to initialize i18next differently etc, but these errors still keep occurring.
What could be going on? If you need more information, I’m happy to provide it. Our last chance would be to switch to a different internationalization library completely, but I’m a bit hesitant to do that.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Be sure that you import the default classes without the graph parentheses.
closing this for now…still no clue…can’t reproduce. sorry for that…a PR or more information for reproduction would be very welcome