https://github.com/huang2002/hele-create-class
A component class creator for hele.
https://github.com/huang2002/hele-create-class
3h class component create es5 hele
Last synced: 11 months ago
JSON representation
A component class creator for hele.
- Host: GitHub
- URL: https://github.com/huang2002/hele-create-class
- Owner: huang2002
- License: mit
- Created: 2018-08-06T12:18:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T14:15:39.000Z (almost 8 years ago)
- Last Synced: 2025-08-21T16:54:45.938Z (11 months ago)
- Topics: 3h, class, component, create, es5, hele
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# hele-create-class
A component class creator for hele.
# Usage
```js
// 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.md).