-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inferno-compat issue: TypeError: _react.default.createContext is not a function #1483
Comments
What kind of functionality you need from i18next framework? We are sing i18next package and calling translate method there. |
Translations, primarily the Trans tag and T tags, in JSX / TSX I did find this project, which appears to have I18n support for inferno directly, but it doesn't have much documentation. https://github.com/nimbusec-oss/inferno-i18next After I add some typings for it I'll be able to test it out. |
like preact you need the polyfill version of react-context. and if you build with web pack if still not working; Maybe it will be good to add a inferno-context like preact-context do (easy just simply copy create-react-context') |
Versions:
I'm trying to internationalize an app I've written in inferno. I tried lingui, and failed, and now am trying i18next, using
inferno-compat
.Observed Behaviour
After aliasing
react
andreact-dom
toinferno-compat
, it correctly compiles, but gets the console error:TypeError: _react.default.createContext is not a function
If I alias them to simply
inferno
, I get:TypeError: _react.default is undefined
I should also say that I'm using inferno with typescript and fuse-box, and the aliasing is done in fuse-box, and it's working correctly.
Here's the example I'm working from, its straight
.ts
imports, no extra babel packaging or anything.Really if anyone has found any i18n framework that works with inferno, I'd be happy to know which one.
The text was updated successfully, but these errors were encountered: