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.
Conditional rendering and protected route
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Conditional rendering and protected route
- Now you want to navigate to My Stock Images and be able to see your own stock images. So I'm using for this demo, the same main and primary account for this demo. So we're going to go back to the source code and do a quick change because something you should also notice, is that, right here. So remember that, every time that you were uploading a new image to the database, to the storage and then to the database, you are also specifying to LowerCase. So we must do the same. So when we want to find the right match, so to compare the user with the current user, who is connected, we must also specify to LowerCase, and that should work perfectly. So now we are in the homepage. And now let's navigate to My Stock Images. And now you can see that we can display correctly, the stock images of the current user. So let's try to make another test, from. So right now the looks like we have like an issue. And that is because, once…
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)
Install React router DOM v62m 53s
-
(Locked)
Configure the routes and create a navigation component2m 51s
-
(Locked)
Use Link component to navigate between pages4m 58s
-
(Locked)
Allow navigation between multiple views5m 39s
-
(Locked)
Conditional rendering and protected route4m 45s
-
(Locked)
Use the React router hooks: useNavigate4m 58s
-
(Locked)
Use the React router hooks: useLocation4m 35s
-
(Locked)
Create the routes for "NotFound" and "Profile"5m 15s
-
(Locked)
Display the active link3m 42s
-
(Locked)
-
-
-