You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I reload a page - and I believe it only happens when the state i persisted - I get the warning message
[vuex] state field "route" was overridden by a module with the same name at "route"
In my opinion this shouldn't be happening, because I didn't define any modules in my store. changing the module name to e.g. "RouteModule" as written in the docs throws the same warning, except then with "RouteModule" instead of "route".
Is there a way to fix this?
The text was updated successfully, but these errors were encountered:
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
importVuefrom"vue";importVuexfrom"vuex";importcreatePersistedStatefrom"vuex-persistedstate";Vue.use(Vuex);exportdefaultnewVuex.Store({plugins: [createPersistedState({// This omits the plugins/vue-router-sync state.route from persistingpaths: ["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.
I use the following packages:
When I reload a page - and I believe it only happens when the state i persisted - I get the warning message
In my opinion this shouldn't be happening, because I didn't define any modules in my store. changing the module name to e.g. "RouteModule" as written in the docs throws the same warning, except then with "RouteModule" instead of "route".
Is there a way to fix this?
The text was updated successfully, but these errors were encountered: