JSPM

hele-create-class

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23834F
  • License MIT

A component class creator for hele.

Package Exports

  • hele-create-class

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 (hele-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

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.