wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.34k stars 1.22k forks source link

Best Practice Vuex with syncstores #556

Closed md-pt closed 3 years ago

md-pt commented 3 years ago

Hi,

first of all, thank you for wails.app and all the hard work you put in.

I am currently using a messy approach to handle states between backend and frontend and I am actively exploring opportunities to get that managed better in the future :) I am using Vue / Vuetify and I have been wondering how to properly bundle Vuex and the new syncstore feature. A few pointers in the right direction would be very much appreciated.

Thank you, Michael

leaanthony commented 3 years ago

Hi Michael. Can't comment on VueX as it's been way too long since I used them. You are, of course, free to use what you want for managing state. Sync Stores are super simple and based on Svelte stores. It should be possible to keep them in sync as the API is really light. Take a look at the update and subscribe methods.