1.0.1 • Published 6 years ago

@thesold/x-model v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

X-Model

npm

Authors:

Overview

Vue.js renderless component to work with Vuex when v-model is not suitable because changes should be commited via mutations. X-model will disconnect the v-model passed in and make it non-reactive allowing you to listen to the updated event to commit changes to your Vuex Store.

Installation

npm install @thesold/x-model
import XModel from '@thesold/x-model'

Vue.component(XModel)

Usage

<x-model :value="reactiveProp" @input="updateModel">
    <template slot-scope="{ frozenValue }">
        <!-- input/updateModel will be fired when frozenValue is changes, however reactiveProp will not receive any updates from the component -->
    </template>
</x-model>
1.0.1

6 years ago

1.0.0

6 years ago