1.0.6 • Published 3 years ago

vuex-maphooks v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

VUEX-HOOKS

Usage

参照vuex mapState 等函数用法,或直接调用相关hooks会有代码提示.

api

  1. mapStateToComputed(namespace, options) -- overload --> mapStateToComputed(options)

  2. mapMutationsToMethods(namespace, options) -- overload --> mapMutationsToMethods(options)

  3. mapGettersToComputed(namespace, options) -- overload --> mapGettersToComputed(options)

  4. mapActionsToMethods(namespace, options) -- overload --> mapActionsToMethods(options)

examples

// use namespace
const {
  rename
} = mapStateToComputed("a/", {
  rename : "name"
});

or

const {
  name
} = mapStateToComputed("a/", ["name"]);

// no namespace

const {
  reCount
} = mapStateToComputed({
  reCount : "count"
});

const {
  count
} = mapStateToComputed(["count"]);
1.0.6

3 years ago

1.0.2

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago