c3624695c5 | ||
---|---|---|
.. | ||
config | ||
dist | ||
src | ||
README.md | ||
package.json |
README.md
Omiv
Observable store system for Vue apps.
Usage
import { $v } from 'omiv'
import App from './App.vue'
$v.render(App, '#app', new class {
data = {
count: 1
}
sub = () => {
this.data.count--
}
add = () => {
this.data.count++
}
})
HelloWrold.vue:
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<button @click="store.sub">-</button><span>{{state.count}}</span><button @click="store.add">+</button>
</div>
</template>
<script>
import {$v} from 'omiv'
export default $v({
name: 'HelloWorld',
props: {
msg: String
},
//or use: ['count']
useSelf: ['count']
})
</script>