vue-electron / vuex-electron

Integration of Vuex and Electron
MIT License
305 stars 96 forks source link

Is Data Stored in my Vuex when i build electron app and then close it? #36

Closed thesogafoi closed 4 years ago

thesogafoi commented 5 years ago

Hey Guys i'm so confusing i want to build an electron app whit vue an vuex i have two questions

1) if i close app (for example turn off my pc and after few days turn on it and open the app again ) , all data saved to vuex or not ? need i use databases like sqlite to store data from vuex?

2) i want to have two databases localdatabase and online database i can handle online database but how can i share some localdatabase to server for example i add two project to my local database and i want send second projects'data with axios to server how can i handle this i should to have sqlite-vuex-vue-electron or i can handle it with vuex-vue-electron

Zyles commented 5 years ago

Vuex is a state management for the session, it is not persistent. Either save and load the state on disk in JSON files or in a database such as SQLite.

JoacoEsteban commented 5 years ago

Is this so? I see that part of the store is persistent and is maintained across builds.

Zyles commented 5 years ago

Vuex by default does not, but with this library if you use the createPersistentState option it will save the store in AppData.

akodkod commented 5 years ago

https://github.com/vue-electron/vuex-electron/issues/44

koibi2 commented 5 years ago

createPersistentState

it should be createPersistedState

ismailramzan commented 3 years ago

after build electron app the createPersistedState does'nt store data after closing app. have any idea about this type of error why data is no stored when we use createPersistedState in electron-vue app. if any one tell me i will apreatiate him please! soon reply