Skip to content

egoist/vue-observe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-observe

NPM version NPM downloads CircleCI donate chat

Install

yarn add vue-observe

Usage

Edit vue-observe

import observe from 'vue-observe'

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

About

A decorator to make class properties reactive with Vue.js

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published