React-i18next: Uncaught TypeError: t is not a function

Created on 22 Oct 2017  路  6Comments  路  Source: i18next/react-i18next

Hi,

I am implementing below example.
https://github.com/i18next/react-i18next/tree/master/example/locize-example

I am getting below error

Uncaught TypeError: t is not a function
at App.render (App.jsx:22)
at finishClassComponent (react-dom.development.js:10249)
at updateClassComponent (react-dom.development.js:10226)
at beginWork (react-dom.development.js:10605)
at performUnitOfWork (react-dom.development.js:12573)
at workLoop (react-dom.development.js:12682)
at HTMLUnknownElement.callCallback (react-dom.development.js:1299)
at Object.invokeGuardedCallbackDev (react-dom.development.js:1338)
at invokeGuardedCallback (react-dom.development.js:1195)
at performWork (react-dom.development.js:12800)

Can anyone help?

Most helpful comment

add Vue.use(VueI18n) in your script.js file

All 6 comments

did you run the sample as is...or added some stuff?

I have not added any stuff

just pulled...npm i + npm start -> no error...

the error looks like the component gets not extended by the translate hoc but obviously is...https://github.com/i18next/react-i18next/blob/master/example/locize-example/src/App.js#L33

are you sure you did not change anything....

add Vue.use(VueI18n) in your script.js file

@GraxMonzo hm...very funny

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martinlaregina picture martinlaregina  路  3Comments

a-barbieri picture a-barbieri  路  4Comments

leandrocamacho picture leandrocamacho  路  4Comments

MohammedAl-Mahdawi picture MohammedAl-Mahdawi  路  4Comments

ChCosmin picture ChCosmin  路  4Comments