From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Get documents and display them in the app
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Get documents and display them in the app
- [Instructor] Now that we've been able to successfully get the snapshot from the Cloud Firestore, so we want to get them and actually display them in the gallery. So that's going to be the next step and final step of this demo. And to do that, let's go back to our source code. And we've been managing the state so far with the context. So remember that we want to use as much as possible state management which is flat with a flat structure, meaning that we're going to use one single source of truth. So we separate logic and presentation, and we also manage the data from a database with Cloud services. But for example, so the method that we have written we're going to use this one from the contexts. So I'm going to make sure that I import firestore from, that's going to be one level up. No, actually it's going to be like this. This is at the same route, and handlers and then firestore. And I'm going to get firestore and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
Get started with the Cloud Firestore3m
-
(Locked)
Learn to add and manage data5m
-
(Locked)
Set a new document and store and sync data into the Cloud Firestore5m 53s
-
(Locked)
Learn to read data from a collection5m 32s
-
(Locked)
Get documents and display them in the app5m 18s
-
(Locked)
Define React environment variables4m 39s
-
-
-
-
-
-
-