JSPM

inferno-create-class

8.2.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19136
  • Score
    100M100P100Q142147F
  • License MIT

Provides a helper to create Inferno Components without needing ES2015

Package Exports

  • inferno-create-class
  • inferno-create-class/dist/index.esm.js
  • inferno-create-class/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (inferno-create-class) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

inferno-create-class

Provides a helper to create Inferno Components without needing ES2015

Warning: This package will .bind all class methods to its instance! We recommend using ES2015 classes and transpiling them with babel or typescript.

This package was implemented to provide alternative for old React.createClass.

Install

npm install inferno-create-class

Usage

import { createClass } from 'inferno-create-class';
import { render } from 'inferno';

const MyComponent = createClass({
    displayName: 'MyComponent',
    render: function() {
        return <div>Hello, world!</div>;
    }
});

render(<MyComponent />, container);