Gathering detailed insights and metrics for vuex-router-sync
Gathering detailed insights and metrics for vuex-router-sync
Gathering detailed insights and metrics for vuex-router-sync
Gathering detailed insights and metrics for vuex-router-sync
nuxt-vuex-router-sync
vuex-router-sync integration for Nuxt
vuex-enhanced-router-sync
This package replaces vuex-router-sync and adds some useful features.
react-router-redux
Ruthlessly simple bindings to keep react-router and redux in sync
next-router-mock
Mock implementation of the Next.js Router
Effortlessly keep vue-router and vuex store in sync.
npm install vuex-router-sync
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2,515 Stars
79 Commits
125 Forks
48 Watching
4 Branches
85 Contributors
Updated on 11 Oct 2024
JavaScript (57.43%)
TypeScript (42.57%)
Cumulative downloads
Total Downloads
Last day
-10.8%
15,167
Compared to previous day
Last week
-2.8%
83,182
Compared to previous week
Last month
33%
351,900
Compared to previous month
Last year
-19.6%
3,523,474
Compared to previous year
2
6
Sync Vue Router's current $route
as part of Vuex store's state.
ä¸æ–‡ç‰ˆæœ¬ (Chinese Version)
1# the latest version works only with vue-router >= 2.0 2npm install vuex-router-sync 3 4# for usage with vue-router < 2.0: 5npm install vuex-router-sync@2
1import { sync } from 'vuex-router-sync' 2import store from './store' // vuex store instance 3import router from './router' // vue-router instance 4 5const unsync = sync(store, router) // done. Returns an unsync callback fn 6 7// bootstrap your app... 8 9// During app/Vue teardown (e.g., you only use Vue.js in a portion of your app 10// and you navigate away from that portion and want to release/destroy 11// Vue components/resources) 12unsync() // Unsyncs store from router
You can optionally set a custom vuex module name:
1sync(store, router, { moduleName: 'RouteModule' } )
It adds a route
module into the store, which contains the state representing the current route:
1store.state.route.path // current path (string) 2store.state.route.params // current params (object) 3store.state.route.query // current query (object)
When the router navigates to a new route, the store's state is updated.
store.state.route
is immutable, because it is derived state from the URL, which is the source of truth. You should not attempt to trigger navigations by mutating the route object. Instead, just call $router.push()
or $router.go()
. Note that you can do $router.push({ query: {...}})
to update the query string on the current path.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 3/29 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
36 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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