markdown guide

I always have my firebase db actions handled in the vuex store! That way, you never have to directly manipulate the firebase object inside a component, instead you can just call this.$store.commit('updateXProperty', value) to send your mutations to a centralized source. It makes debugging easier, and database updates safer since you can add your own data validation in the store that'll be applied to all updates throughout your app.

In fact, I often split all firebase actions out into their own file that I simply import once in the vuex store, just to further separate different tasks.


Thanks for the tip, Jasper! I asked on the Vue Discord as well and they said I should check VueFire.

Another question, though. How about the authentication? Do you use Vuex for it as well?


I'd definitely rely on the vue discord's advice, as they're much more the authority than I am :)

I usually use dotenv for my credentials, which is just imported in my database handling file, which handles credentials for my database.

Classic DEV Post from Jun 14 '19

How do you organize your projects?

Where do you keep your side projects and portfolio?

Bos Eriko Reyes profile image
UI/UX Designer — Fullstack Website Developer using TypeScript and Ruby