Vue, VUEX & Convergence example?


we’ve build a Vue.js app and trying to add some real-time collaboration features into it. All our (JSON) contents are coming from a database and are stored in/with VUEX to make them globally available.

Unfortunately, we couldn’t find an example of how a connection with VUEX could work, but we think that convergence would be the best fit for our app. Is there anyone who has realized such a connection and can provide us with a few snippets here?

Our main goal is to update the VUEX state object (nested) from different points / components inside our app and sync them automatically with Convergence (and every other connected user).

Thank you in advance!

Welcome to the forum!

I don’t have much experience with vuex, but the answer depends on how much control it requires. When you use Convergence, you are effectively lifting much of your application’s state to the server. This is necessary to keep remote users all in sync. Thus, any client-side state management must be flexible enough to accept external mutations.

See our guide here for more details, especially the “Designing real-time co-editing-enabled applications” section. We have used the flux pattern several times (and mobx as well) in our demo applications, but I can’t point you to any apps we’ve built using vuex, unfortunately.