
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@vueblocks/vue-use-vuex
Advanced tools
Use Vuex With Composition API Easily.
# Vue 2 with @vue/composition-api
yarn add @vue/composition-api @vueblocks/vue-use-vuex -S
or
npm i @vue/composition-api @vueblocks/vue-use-vuex -S
# Vue 3
yarn add @vueblocks/vue-use-vuex -S
or
npm i @vueblocks/vue-use-vuex -S
useVuex
utilities just similar with Vuex Component Binding Helpers
It export these composable helpers:
mapState
helper in VuexmapGetters
helper in VuexmapMutations
helper in VuexmapActions
helper in VuexDifferently, useVuex
do not export createNamespacedHelpers
function, Instead useVuex
allow you provide
the namespace as first argument, then return will be the namespaced component binding helpers.
Read more about namespacing documention.
useStore
utilities just do the same thing with Vuex 4.x composition api useStore
It seems familiar right?
/**
* Get $store from current instance
* @return {Store} vm.$store
*/
declare const useStore: () => Store<any>;
/**
* Use Vuex with composition api easily. Both support Vue2.x / Vue3.x
* @param {String} namespace
* @param {Store} store ### vm.$store
*/
declare function useVuex(namespace?: string, store?: Store<any>): {
useState: (namespace?: string, map: Array<string> | Object<string | function>) => Object<ComputedRef>
useGetters: (namespace?: string, map: Array<string> | Object<string>) => Object<ComputedRef>
useMutations: (namespace?: string, map: Array<string> | Object<string | function>) => Object
useActions: (namespace?: string, map: Array<string> | Object<string | function>) => Object
};
FAQs
Use Vuex With Composition API Easily.
The npm package @vueblocks/vue-use-vuex receives a total of 896 weekly downloads. As such, @vueblocks/vue-use-vuex popularity was classified as not popular.
We found that @vueblocks/vue-use-vuex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.