From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Manage the state with the Context API: Component Provider
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Manage the state with the Context API: Component Provider
- [Instructor] Like we did in a previous part, we want to learn to keep the logic and the presentation separate. So we use the popular solution of the context API that provides a way to share values without having to explicitly and manually pass data down from the parents to child components. So to complete this section with user authentication the goals will be to create first a context object, create a component provider and later to create a custom hook. So let's begin with first creating a new object, context object. And that's going to be a new directory because we're going to have more than one now. So this one I'm going to move inside. So this context file, I'm going to move inside this directory. I'm going to say move and it should update like, every reference that we make to this file. We should update because now it's going to be named differently, so, we're going to call it FirestoreContext, like so. 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
-
-
-
-
-
-
-
-
-
-
(Locked)
Start with Firebase Authentication and select the provider2m 57s
-
(Locked)
Google Cloud Platform: Create new credentials3m 17s
-
(Locked)
Authenticate and manage users from the application5m 46s
-
(Locked)
Manage the state with the Context API: Component Provider5m 3s
-
(Locked)
Manage the state with the Context API: Custom hook5m 34s
-
(Locked)
Subscribe components to the context changes: User connected4m 59s
-
(Locked)
Create new documents with the user connected5m 26s
-
(Locked)
Secure your data in Cloud Firestore and Cloud Storage5m 43s
-
(Locked)
-
-
-
-