inferno-create-class
TypeScript icon, indicating that this package has built-in type declarations

8.0.6 • Public • Published

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);

Install

npm i inferno-create-class

DownloadsWeekly Downloads

49,042

Version

8.0.6

License

MIT

Unpacked Size

38.4 kB

Total Files

13

Last publish

Collaborators

  • longlho
  • nightwolfz
  • lukesheard
  • trueadm
  • havunen