@loong-js/model
v0.5.0
Published
This is loong model
Downloads
5
Readme
@loong-js/model
This is loong model.
📦 Installation
npm install @loong-js/model
🔨 Usage
import { store } from "@loong-js/model";
class Global {
@observable
value = 1;
@action
addValue() {
this.value += 1;
}
}
@Component()
class Test {
render() {
const { global } = store.get();
return (
<div>
value: {global.value}
<button onClick={global.addValue}>Add</button>
</div>
);
}
}
🐛 Issues
If you find a bug, please file an issue on our issue tracker on GitHub.
🏁 Changelog
Changes are tracked in the CHANGELOG.md.
📄 License
@loong/model
is available under the MIT License.