Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hele-create-class

huang200219MIT0.1.3TypeScript support: included

A component class creator for hele.

hele, create, class, es5, component, 3h

readme

hele-create-class

A component class creator for hele.

Usage

// Use as an es module:
import { createClass } from "hele-create-class";
// Or use as a umd module:
const createClass = HEle.createClass;
// The method returns a component class:
const MyButton = createClass({
    // Pass your methods to it:
    render() {
        // ...
    },
    // Methods are automatically bound to the component instance:
    handleClick() {
        // ...
    },
    // `defaultProps` is also supported:
    defaultProps: {
        // ...
    }
});

Changelog

See CHANGELOG.md.

changelog

0.1.3 - 2018-08-10

  • Fix terser options

0.1.2 - 2018-08-07

  • Improve type declarations

0.1.1 - 2018-08-06

  • Update type declarations

0.1.0 - 2018-08-06

  • Initial release