So Rob, what does VueFire bring to the table? Also, since you created a ToDos property under firestore, couldn't you use that in your methods than typing db.collection("ToDos")?
It gives you realtime functionality on your vue app without having to code the bindings yourself. I actually like to use VuexFire to keep my Vuex store in sync with my database.
@@DiligentDev So when you install it, it works behind the scene? As I didn't notice you had to manually call any methods or extra binding. Perhaps I missed something. My next question is the Firestore cost for the realtime binding. Say you have 500 users on a page with Data table. When using VueFire, and data data changes on Firestore, wouldn't 500 new fetches made to Firestore server with 500 reads, which basically Firebase will charge you for Reads, CPU, Bandwidth and etc.? In using SDK, you have to manually opt for that realtime update and knowing you will get charged for it. Am I right? Thanks for the reply!
@@BenHayat The firestore property you get in the Vue Options API is what does all the heavy lifting. Firestore costs are based on reads, writes, and deletes. They don't factor in CPU or bandwidth. You get a set number for free every day. I've never seen the opt-in for real-time capabilities. I will say that you should be careful not to over fetch. I would implement paging and queries where you can. Also, don't loop through data to aggregate anything. Keep a property in your collection/document for aggregates. I would code to minimize operations. Generally, if you're getting a large bill from Firebase, that means you either have a successful app (good problem) or you did something wrong. You can find the pricing here: firebase.google.com/pricing.
@@DiligentDev Awesome reply: >>I've never seen the opt-in for real-time capabilities. Be sure to watch this video and the link's content. The video did clarify my concern on the charges, as Firebase SDK uses local caching. But a great read and video. firebase.google.com/docs/firestore/query-data/listen#web
@@BenHayat Thank you for sharing! I just watched the video and I didn't know about the caching. Very good to know that I'll only be charged for the documents that change.
There is some problem in the firestore I couldnt handle what it is also probably because of this problem I am not able to see my to do list. Thanks for helipng.
The V-card is simply not appearing when i try to recreate what you have done, my database registers it properly, but doesn't push it back to the v-card. Any clue?
Hi, I work for a restaurant and I've been looking for some simple video about Vue, Vue router, Vuetify, Vuefire, and firebase authentication, so that I can make my own table booking system which customers can only create and edit the bookings they made, but managers can edit(add,delete, update, cancel...) If you could make a video like this, that would be great and it is more practical.... Anyway, thank you for the video.