vue-observe
v0.1.1
Published
A decorator to make class properties reactive with Vue.js
Downloads
10
Readme
vue-observe
Install
yarn add vue-observe
Usage
class Store = {
@observe count = 1
get double() {
return this.count * 2
}
inc() {
this.count++
}
}
const store = new Store()
// Your Vue.js app
new Vue({
render() {
return (
<button onClick={() => store.inc()}>
{store.count}:{store.double}
</button>
)
}
})
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
vue-observe © EGOIST, Released under the MIT License. Authored and maintained by EGOIST with help from contributors (list).
egoist.moe · GitHub @EGOIST · Twitter @_egoistlily