Binding helpers for Vuex and vue-facing-decorator
Designed for vue 3, do the same work like vuex-class.
Welcome to suggest and contribute.
npm i vuex-facing-decorator
import { h } from 'vue';
import { Component, Vue } from 'vue-facing-decorator';
import { namespace, State } from 'vuex-facing-decorator';
const ModuleA = namespace('useModuleA');
@Component
class Tests extends Vue {
@State globalSomeName;
@State('globalCount') globalCount;
@ModuleA.State someName;
@ModuleA.State('count') count;
@ModuleA.State((state, getter) => state.count + getter.doubleCount) count_doubleCount;
@ModuleA.Getter('doubleCount') doubleCount;
@ModuleA.Mutation('increment') increment;
@ModuleA.Action('actionIncrement') actionIncrement;
render() {
return h('div', this.count);
}
}
To discord https://discord.gg/W2VE5au3