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-router-sync-previous
Effortlessly keep vue-router and vuex store in sync.
vuex-enhanced-router-sync
This package replaces vuex-router-sync and adds some useful features.
vuex-router-sync-fullpath
Effortlessly keep vue-router's current fullPath and vuex store in sync.
Effortlessly keep vue-router and vuex store in sync.
npm install vuex-router-sync
Typescript
Module System
Node Version
NPM Version
JavaScript (57.43%)
TypeScript (42.57%)
Total Downloads
27,213,501
Last Day
10,913
Last Week
59,177
Last Month
258,332
Last Year
3,377,806
MIT License
2,510 Stars
79 Commits
126 Forks
47 Watchers
4 Branches
87 Contributors
Updated on Apr 11, 2025
Minified
Minified + Gzipped
Latest Version
5.0.0
Package Id
vuex-router-sync@5.0.0
Size
2.73 kB
NPM Version
5.4.1
Node Version
8.4.0
Published on
Oct 12, 2017
Cumulative downloads
Total Downloads
Last Day
68.9%
10,913
Compared to previous day
Last Week
9.3%
59,177
Compared to previous week
Last Month
-4.8%
258,332
Compared to previous month
Last Year
-12.2%
3,377,806
Compared to previous year
2
6
Sync vue-router's current $route as part of vuex store's state.
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 './vuex/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 and you 10// navigate away from that portion and want to release/destroy Vue components/resources) 11unsync() // 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
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-04-28
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