0.1.1 • Published 6 years ago

vue-observe v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

vue-observe

NPM version NPM downloads CircleCI donate chat

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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