paulgv / nuxt-vuex-router-sync Goto Github PK
View Code? Open in Web Editor NEWvuex-router-sync ingegration for Nuxt
License: MIT License
vuex-router-sync ingegration for Nuxt
License: MIT License
Currently this module is loaded with ssr: false
.
If I access the rootState.route for some reason during the SSR (i.e. in a getter function), the route store is not available causing issues in the SSR rendered page.
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content
...
Putting ssr: true, solves the issue with no drawbacks
Hello! I have implemented similar solutions and applied the following to store/index.js
Just share here in case anyone needed
Because by the time if loading the computed
property by Nuxt, it is not yet mounted, so any after-mount property for non-ssr environment such as `this.$store.state.route.path is not yet available.
// store/index.js
// tested on [email protected]
import { sync } from 'vuex-router-sync'
export default {
actions: {
async nuxtServerInit ({ dispatch }, { app }) {
console.log('nuxtServerInit in index');
sync(app.store, app.router); // for life cycle such as computed value which is before mounted
}
}
}
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | eslint-plugin-standard |
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
eslint-config-standard
, eslint-plugin-import
, eslint-plugin-jest
, eslint-plugin-node
, eslint-plugin-promise
, eslint-plugin-standard
, eslint-plugin-vue
, jest
, nuxt
).circleci/config.yml
package.json
vuex-router-sync ^5.0.0
eslint 6.8.0
eslint-config-standard 14.1.0
eslint-plugin-import 2.20.1
eslint-plugin-jest 23.8.0
eslint-plugin-node 11.0.0
eslint-plugin-promise 4.2.1
eslint-plugin-standard 4.0.1
eslint-plugin-vue 6.2.1
jest 25.1.0
nuxt 2.11.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.