From the course: Vue.js 2: Full-Stack Applications with Firebase

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Reading dynamic snapshots

Reading dynamic snapshots

From the course: Vue.js 2: Full-Stack Applications with Firebase

Start my 1-month free trial

Reading dynamic snapshots

- Let's work on reading the data from our database so that we can display it in here. So we'll go over to App.vue, and down here where we check to see when the component is mounted, we're checking to make sure that the user exists, and then we're going to need to add a read statement right here, and we're going to read all the information into a variable that we're going to call meetings here. So this will be a empty array to begin with. And let's go ahead and make this wider here. So, now we can use the information from the database. And we're going to look for the user's collection, and in there we're going to look for the document with the current user's id, and we're going to then look for the collection called meetings. So once we do that, we are going to check to see if there's any new information. So this is a little bit different. Before, we were just reading data from the database. We were doing it once,…

Contents