You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and if you build with web pack
add an alias:
"create-react-context": node_module/create-react-context,
if still not working;
manually find all package using react.createContext and be sure it's pointing to the create-react-context you installed. (me i did that and it's working great now with lot of deps using the context)
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: