Vue become

A Vue.js plugin for subscribing to dynamic property changes

Version: 1.0.0 Updated: 10/04/2017

By: nickforddesign

Downloads Last 30 Days: 13

vue-become

Build Coverage Status License: MIT

A modern fetch plugin for Vue.js with easy config config and hooks

Installation

npm install vue-become

Setup

import Vue from 'vue'
import VueBecome from 'vue-become'

Vue.use(VueBecome, options)

Usage

import Vue from 'vue'
export default {
  data() {
    return {
      active: false
    }
  }
  mounted() {
    setTimeout(() => {
      this.active = true
    }, 1000)

    this.$become('active', true)
      .then(() => {
        console.log('component is now active')
      })
  }
}

Build Setup

# install dependencies
npm install

# serve demo at localhost:8080
npm start

# run tests with jest
npm test

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

Categories: Vue js
Tags: