Vue recomputed

Recomputable computed properties in Vue

Version: 0.0.1 Updated: 08/09/2018

By: posva License: MIT

Downloads Last 30 Days: 64

Install

npm i vue-recomputed
yarn add vue-recomputed

Repository: https://github.com/posva/vue-recomputed

CDNs

bundle.run: https://bundle.run/vue-recomputed

jsDelivr: https://cdn.jsdelivr.net/npm/vue-recomputed

unpkg: https://unpkg.com/vue-recomputed

VueRecomputed Build Status npm package coverage thanks

Recomputable computed properties in Vue

⚠️ You probably don't need this, please, first check this issue and this comment and this other one as well

Installation

npm install vue-recomputed

Usage

This is a silly example to showcase the API. Never do this kind of thigs:

export default {
  recomputed: {
    currentTime() {
      // you have access to the component as with computed properties
      return Date.now()
    },
  },

  methods: {
    updateTime() {
      this.$recompute('currentTime')
    },
  },
}

License

MIT

Categories: Vue js
Tags: