Closed xorbis closed 4 years ago
closeDBChannel with clearModule param? I’m outside now but once i’m back i’ll link the proper docs!!
Sent with GitHawk
Hi thanks for the reply. I am currently using fetchAndAdd not openDBChannel.
Hi @xorbis I only ever built this function for openDBChannel
, however, if you look here, you'll see that the closeDBChannel just commits a mutation:
https://github.com/mesqueeb/vuex-easy-firestore/blob/master/src/module/actions.ts#L812
commit('RESET_VUEX_EASY_FIRESTORE_STATE')
You can commit this mutation to reset the state. And if you want to know exactly what this mutation does, it's here: https://github.com/mesqueeb/vuex-easy-firestore/blob/master/src/module/mutations.ts#L44
This will be handled differently in v2.0 which is now being developed. 😉
--
Vuex Easy Firestore was made with ♥ by Luca Ban.
If you use this library in your projects, you can support the maintenance of this library by a small contribution via Github 💜.
You can also reach out on twitter if you want a one-on-one coding review/lesson. 🦜
Thanks, will try ASAP.
I am wondering how to cleanup the VueX state once a user logs out. Is there something I am missing in the documentation or is it obvious?
The problem is that if I login a user and fetch some data and then logout, the data will still be present in the view from the previous user session.