2.2.2 • Published 8 months ago

vuex-fast v2.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

vue-fast

a simple library for use vuex easily

yarn add vuex-fast

init in vue2

import vuexFast from 'vuex-fast';

const modules = vuexFast({
  a: moduleA,
  b: moduleB,
});

const store = new Vuex.Store({ modules });

init in vue3

import vuexFast from 'vuex-fast';

import { createStore } from 'vuex';

const modules = vuexFast({
  a: moduleA,
  b: moduleB,
});

const store = createStore({ modules });

use

// State
numeric: {
  a: 100,
  b: 200
}

// Action
calculate({ state }) {
  return {
    numeric: {
      a: state.a,
      b: state.a + state.b
    }
  }
}

// Use
this.$store.dispatch('calculate');
console.log(this.$store.state.numeric); // { a: 100, b: 300 }
2.2.1

9 months ago

2.2.2

8 months ago

2.2.0

1 year ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.9

2 years ago

2.1.6

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago