vue-chill

Chill down Vue.js data watchers
3,559 3
Install
npm install vue-chill
Latest Version:0.0.2
License:MIT
Last Updated:Apr 6, 2018
Links: GitHub  ·  npm
Maintainer: dbpolito

vue-chill

Chill down Vue.js data watchers.

Vue.js adds a watcher to each and every attribute you define on your component. To lock down and avoid too much watchers, you can tell Vue to chill down and not watch a few of those attributes.

Usage

Install with npm/yarn:

npm install vue-chill

yarn add vue-chill

Import on your js file and tell Vue to use it:

const Vue = require('vue');
const VueChill = require('vue-chill');

// or
import Vue from 'vue';
import VueChill from 'vue-chill';

Vue.use(VueChill);

Then, on every component you need to chill something, just add a chill array with the attributes to unwatch to the root object:

Vue.component('example-component', {
    name: 'ExampleComponent',

    data () {
        return {
            someUnwatchedAttribute: 'example unwatched attribute',
            imStillWatched: 'example watched attribute',
        },
    },

    chill: [ 'someUnwatchedAttribute' ],
});

License

MIT.

Related Packages

vue-sub

Simple observer pattern implementation for VueJS

924 2
kr-observable

Adds reactivity power for your JavaScript

87,949 33
@anchorlib/vue

Vue bindings for Anchor reactive state management

8,573 28
vue-freeze-gif

*Vue component to play / pause gifs*

691 2
vue-resize-observer

Vue普通元素resize事件监听

148,954 63

Version History

Version Released License
0.0.2 MIT
0.0.1 MIT