Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not updating the state #43

Open
Zyles opened this issue Aug 6, 2019 · 4 comments
Open

Not updating the state #43

Zyles opened this issue Aug 6, 2019 · 4 comments

Comments

@Zyles
Copy link

Zyles commented Aug 6, 2019

If I use both createPersistedState, createSharedMutations I can call store.dispatch('setAuthCode', query.code ) from my main process.

If I remove createSharedMutations I can not.

But using both, I can not update the state in my component using: this.$store.dispatch('setAuthCode', code)

If I remove createSharedMutations I can update state in my component.

Without createSharedMutations the vuex.json updates, but it is not reacting and updating in the component.

How can I call an action to mutate the state from both main and render process? I thought this was the point of the package. Not either or.

What gives?

@vterzic
Copy link

vterzic commented Aug 15, 2019

This should fix it

@Zyles
Copy link
Author

Zyles commented Aug 15, 2019

Already have import store from './store' in my background.js

@vterzic
Copy link

vterzic commented Aug 16, 2019

Are you using electron-vue boilerplate?

I had the exact same problem as you and above mentioned solution fixed it.

@akodkod
Copy link
Contributor

akodkod commented Aug 29, 2019

#44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants