Giter Club home page Giter Club logo

Comments (3)

denizderman avatar denizderman commented on June 2, 2024

Is vuex-router-sync going to support vue3? I believe this issue is related to that, but I might be wrong.

from vuex-router-sync.

mylemans avatar mylemans commented on June 2, 2024

Is vuex-router-sync going to support vue3? I believe this issue is related to that, but I might be wrong.

FYI: I'm having this issue on vue2
edit: Seem to trigger (or can trigger) during 'time travel', so for me I can ignore the issue, but I rather would not see that warning ofc

from vuex-router-sync.

jremi avatar jremi commented on June 2, 2024

@Unkrass what you can do...

When you invoke the vuex-persistedstate plugin...

e.g:

import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate";

Vue.use(Vuex);

export default new Vuex.Store({
  plugins: [
    createPersistedState({
      // This omits the plugins/vue-router-sync state.route from persisting
      paths: ["foo", "bar", "zee"],
    }),
  ],
  state: {
    foo: {},
    bar: {},
    zee: {}
  }
});

The above is a simple contrived example... But what is important is passing to the createPersistedState options the paths and explicitly only setting the paths that are in the vuex state. When you do this the vuex-persistedstate plugin won't persist the automatically added state.route that vuex-router-sync injects.

This will make the warning not appear.

Hope this helps.

from vuex-router-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.