1.0.0 • Published 7 years ago

vue-become v1.0.0

Weekly downloads
6
License
-
Repository
github
Last release
7 years ago

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.