Skip to content

gionkunz/vuex-facing-decorator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vuex-facing-decorator

Binding helpers for Vuex and vue-facing-decorator

Designed for vue 3, do the same work like vuex-class.

Welcome to suggest and contribute.

Installation

npm i vuex-facing-decorator

Dependencies

Example

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);
    }
}

Discussion

To discord https://discord.gg/W2VE5au3

About

Vuex decorator specifically designed for Vue3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.5%
  • JavaScript 8.5%