github infernojs/inferno v9.0.0

latest release: v9.0.1
6 days ago

Inferno v9.0.0

This is maintenance release. it drops support for old browser versions including IE and removes old coding patterns.
InfernoJs source code has been modernized to support latest versions of tooling.

Breaking changes

inferno-create-class has been removed, use createComponentVNode, createElement APIs instead.
If you were using createClass to wrap the class into observable you can do the same by extending inferno component.

observer(
  class MyCom extends Component {
    componentWillReact() {
      willReactCount++;
    }

    render() {
      return (
        <div id="x">
          {[foo.a.get(), foo.b.get(), foo.c.get()].join(',')}
        </div>
      );
    }
  },
);

Inferno v9 requires following features to be present in the executing runtime:

  • Promise
  • String.prototype.includes()
  • String.prototype.startsWith()
  • Array.prototype.includes()
  • Object.spread()

options.componentComparator has been removed
options.renderComplete has been removed, same result can be achieved by calling own function after render

ES module bundle extension is now .mjs

inferno.esnext.js bundle has been removed and replaced with inferno.mjs bundle.
The following bundles have been renamed:

inferno.esm.js is now inferno.mjs

inferno.dev.esm.js is now inferno.dev.mjs

You may need to change how you are loading inferno dev & production bundles.
for example Webpack config:

...
    resolve : {
        alias: {
            'inferno': isProduction ? 'inferno/dist/index.mjs' : 'inferno/dist/index.dev.mjs',
        }
    },
....

Inferno-core

  • Reworked development mode related inferno warnings #1666
  • Removed click event propagation hack for FireFox 8d0afbe
  • Dependency to hoist-non-inferno-statics removed
  • Multiple typescript type improvements

Inferno-router

  • path-to-regexp-es6 changed to path-to-regexp to include recent bugfixes and address security vulnerability

Inferno-server

  • Fixes an issue where inferno server renders empty style attribute 192a650

Announcing swc-plugin-inferno

swc-plugin-inferno plugin can compile JSX and TSX syntax for inferno specific virtual nodes. It offers improved compilation time compared to existing plugins. In addition it has access to typescript type information which can be used in future for optimizations and new features.

Below chart compares compilation time of inferno repository tests using different compilers.

image

Inferno now supports Eslint v9

Starter template update

The following repository has been updated to create a reference how to use inferno with latest tech including:

Inferno v9
Webpack v5
Typescript v5
SWC v1 see [swc-plugin-inferno](https://github.com/infernojs/swc-plugin-inferno)
Tailwind v4
PostCSS v8
Eslint v9

https://github.com/infernojs/inferno-swc-example

Don't miss a new inferno release

NewReleases is sending notifications on new releases.