Gathering detailed insights and metrics for vuex-react
Gathering detailed insights and metrics for vuex-react
Gathering detailed insights and metrics for vuex-react
Gathering detailed insights and metrics for vuex-react
react-vuex
React bindings for Vuex
vuex-but-for-react
Enjoy the vuex API in your React applications with `vuex-but-for-react`, which uses only React Context and React use-sync-external-store under the hood.
v-vuex
v-vuex 模拟react-redux 模块化
react-vuex-hook
react-vuex-hook是利用React Hook配合Context和useReducer封装的一个用于小型模块的状态管理库,提供类似vuex的语法。
npm install vuex-react
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (78.46%)
CSS (11.47%)
HTML (10.07%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
25 Commits
1 Watchers
5 Branches
1 Contributors
Updated on Sep 14, 2021
Latest Version
0.0.3
Package Id
vuex-react@0.0.3
Unpacked Size
28.28 kB
Size
5.71 kB
File Count
7
NPM Version
6.14.11
Node Version
14.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
19
Global state manager for React (redux, but vuex like)
1npm install --save vuex-react
1import { Provider } from 'vuex-react' 2import App from './App' 3 4const store = { 5 jane: { 6 state: { 7 name: 'Jane', 8 age: 19, 9 }, 10 actions: { 11 makeHerHappy: ({ dispatch, commit }, params) => { 12 // Make your pickup line... 13 }, 14 }, 15 }, 16} 17 18export default () => { 19 return ( 20 <Provider store={store}> 21 <App /> 22 </Provider> 23 ) 24}
1import React from 'react' 2import { 3 useStore, 4 useGetter, 5 useAction, 6 mapActions, 7 mapGetters, 8 useModule, 9} from 'vuex-react' 10 11export default () => { 12 // you can use . instead of / 13 // e.g. useGetter('person.name') 14 const [name, setName] = useGetter('jane/name') 15 const makeJaneHappy = useAction('jane/makeHerHappy') 16 const { state, commit, dispatch } = useStore() 17 18 // Do your stuff 19 20 // name & setName - works as a regular useState, but globally 21 // makeJaneHappy - you can call it likes this: makeJaneHappy() with just one param 22 // state - your global state 23 // commit - can change stuff in your state 24 // dispatch - calls functions in your state 25 26 // vuex like mapGetters & mapActions 27 const { name } = mapGetters({ name: 'jane/name' }) 28 const { makeJaneHappy } = mapActions({ makeJaneHappy: 'jane/makeHerHappy' }) 29 30 // useModule hook 31 // allows you to get all the methods & state from some module 32 // WARNING methods with the same keys as state are going to be overrided by state 33 const jane = useModule('jane') 34 35 // constant "jane" is an object that has inside: 36 { 37 name: 'Jane', 38 age: 19, 39 makeHerHappy: function, 40 } 41 // you can specify noMerge and then you'll see it like this: 42 { 43 state: { 44 name: 'Jane', 45 age: 19, 46 }, 47 methods: { 48 makeHerHappy: function, 49 }, 50 } 51 52 state.jane.name // Jane 53 setName('Jane') 54 makeJaneHappy() 55 commit('jane/name', 'Emma') 56 dispatch('jane/makeHerHappy', "<Your Params>") 57}
MIT © olesh0
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
83 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More