Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent state using vuex-persistedstate: store state in first tab doesnot update when i mutate state in another tab

Hi I am using vuex persistedstate to persist my state.

import createPersistedState from 'vuex-persistedstate'

const store = new Vuex.Store({
// ...
    plugins: [createPersistedState()]
})

What I want to do is update a store state in another tab and the updated store state should be reflected in other open tabs of my app.

How can I achieve so.

like image 407
wrufesh Avatar asked Nov 29 '25 04:11

wrufesh


1 Answers

Use for it vuex-shared-mutations:

GitHub link

enter image description here

like image 115
MaxWall Avatar answered Nov 30 '25 17:11

MaxWall



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!