S
S
sanchokondrat2020-02-26 18:07:28
Vue.js
sanchokondrat, 2020-02-26 18:07:28

How to use vuex in electron if the app has multiple separate windows?

There is an application on electron.js with vue.js, we use vuex. There was a task where it is necessary to make a separate window, but I would like to use a common store. Need advice on how to achieve this? We considered the vuex-electron plugin, but it does not fit (since not all mutations go through actions). I don’t represent options other than ipcRenderer yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-26
@sanchokondrat

You need a plugin. Like vuex -shared-mutations . It uses BroadcastChannel, which in theory can work in a multi-window electron. Well, if it doesn’t take off, you can write your own strategy using ipc and integrate it into this plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question