Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huang2002/hele-hbus
HEle bindings for HBus.
https://github.com/huang2002/hele-hbus
3h bindings hbus hele
Last synced: 3 days ago
JSON representation
HEle bindings for HBus.
- Host: GitHub
- URL: https://github.com/huang2002/hele-hbus
- Owner: huang2002
- License: mit
- Created: 2018-08-17T11:33:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-23T13:41:26.000Z (over 6 years ago)
- Last Synced: 2024-11-15T09:11:36.752Z (2 months ago)
- Topics: 3h, bindings, hbus, hele
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# hele-hbus
HEle bindings for HBus.
# Example
```jsx
const { Bus, Subscription } = HEle, // exported components
busName = 'bus'; // default: HEle.defaultBusNameclass PublishButton extends HEle.Component {
constructor(props, context) {
super(props, context);
this.publish = this.publish.bind(this);
}
publish() {
const { [busName]: bus } = this.context;
bus.publish(new HBus.Action('ACTION_TYPE', PAYLOAD));
}
render() {
return Publish an action;
}
}HEle.render(
{state => (
Current state: {state}
)}
{prop => (
Current prop: {prop}
)}
,
document.getElementById('root')
);
```# APIs
The example above has shown how to use this lib. If you want the detailed API reference, please read the source files in `src` or the type declaration files in `typings`.
# Changelog
See [CHANGELOG.md](CHANGELOG.md)