Hello. I a troubleshoot with react-i18next for translate my app, during the import i18n.js in index.js, I a type error. I m not expert ReactJs and i not resolved this trouble with success, i need help please. Thanks
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import Backend from 'i18next-xhr-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: 'en',
debug: true,
interpolation: {
escapeValue: false,
}
});
export default i18n;
-> export var I18nContext = React.createContext();
"Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_3_react___default.a.createContext is not a function"
run
npm install react@latestand
npm install react-dom@latestits worked for me
In package.json now reads
"react": "^16.8.6", "react-dom": "^16.8.6"
Visit https://github.com/hasura/react-check-auth/issues/7#issuecomment-484208398
It is actually a version miss match so updating the your react-dom, react & redux packages would solve the issue
npm update react react-dom
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With