Ionic/Vue app with Vuex/Firebase. Need help with persisting state!

I asked this question on the Vue forums because I think it’s more relevant there, but maybe someone here has some insight on this:

I am creating an Ionic app using Vue/Vuex/Firebase/Plaid. So far, everything has been going pretty good considering the lack of documentation and support on Ionic/Vue. I have been able to get logins to work and even persist them with Firebase/Vuex.

Now I’d like to start persisting other bits of data as well. Not sure how to do this? Local storage? Also, should I be using Vuexfire? I want to not only keep things in sync all the time, but maybe also offer offline support in the future.

Any tips or tricks would be great! Thanks!

This is a workshop i ran over a year ago that needs to be updated but i did use vuefire in it


Link seems to 404 on Github.

I was able to get Vuexfire working and it’s pretty sweet, although I’ll probably run up a big tab with document reads. Maybe I can use it sparingly. My only issue now is that when I load the app (as an authenticated user) it’s blank until Vuexfire binds. I’d like it if I had some of the state offline. Is this possible?

The reads should be being cached I believe

if that is the case, then you have structured the component incorrectly, the have loading screen and then render when binding is completed

But that means my app has to have constant connection to the internet. I was hoping to have the data in the store kept for offline purposes until it syncs (binds). Do you think that is not possible? If I must have a solid internet connection always I guess I can do that, but I was hoping not. Loading screen in the interim is good but I’d like to know this info for future projects anyway. Can I cache/locally store the Vuex state?

yes? - but there clearly is more information needed to properly define the architecture for the overall application

Sure. You happen to have any free time? Maybe I can use Google Meet to show you what it is I’m working on. C’mon, you know you wanna see what’s caused me to pester you so much! lol… I can explain more or I can upload all this to my github and you could check it out there? Appreciate all your help!