Inferno: Compatibility between Inferno.JS and Semantic UI React

Created on 15 May 2018  路  6Comments  路  Source: infernojs/inferno

I was developing an application using Next.JS + Inferno.JS + Apollo and Semantic UI React .. Once done, in the build process some errors appear like this:

Module not found: Error: Can't resolve 'react' in '/home/gcfabri/Workspace/myproject/components'

Is there any known incompatibility problem about this?

question

Most helpful comment

@gcfabri Love the issue number. 馃槏

All 6 comments

It sounds like bundler issue Webpack / Rollup or similar

Make sure you have Aliased React to inferno if you use React packages with inferno

Here the relevant section from our webpack config. Maybe it helps. We use a react-datepicker in our inferno app.

  resolve: {
    extensions: [ '.js', '.json', '.jsx' ],
    modules: [ dir.source('app'), 'node_modules' ],
    alias: {
      react: 'inferno-compat',
      'react-dom': 'inferno-compat',
    }
  },

@gcfabri Love the issue number. 馃槏

@FQ400 Do you use Apollo and InfernoJS in your project? How did you accomplish that? Just add an alias to react-apollo? I am facing some errors like 'Inferno Error: createElement() name parameter cannot be undefined, null, false or true.

@gcfabri We don't use apollo. I showed an example of how to alias react using webpack to inferno-compat.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trueadm picture trueadm  路  32Comments

kanzelm3 picture kanzelm3  路  35Comments

davedbase picture davedbase  路  47Comments

ilyaigpetrov picture ilyaigpetrov  路  21Comments

darsain picture darsain  路  47Comments