ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

React JS Tutorial - 04 PROTECTED ROUTE - How to make a private route

Автор: Carmelle Codes

Загружено: 2021-02-11

Просмотров: 5893

Описание: Learn how to make a protected page in your app! Protected pages, or private routes, are parts of your application that you want to hide until the user logs in. This tutorial uses react-router-dom for navigation, Firebase for authentication / login, and React Context to keep track of global state in our web app.

0:00 Demo end state of tutorial
1:21 Start of tutorial - making a Login and WebApp Page
2:49 Explaining the plan, to make an AuthContext
4:12 Initialize AuthContext from usehooks
4:30 Cleaning up AuthContext
5:00 Explaining the file
6:00 Import firebase to clear firebase error
6:26 Refactoring auth helper functions
7:28 Add callback for navigating after signup/login
8:00 Add ProvideAuth to index.js, top level of our app
8:35 Call useAuth hook in SignUp Form
9:25 Test out our code manually
9:43 Bug fix
10:00 Back in App.js to make PrivateRoute component
10:41 Initialize PrivateRoute component
10:55 Refactor code from react-router-dom documentation
11:51 Use our routes constants for the Redirect
12:30 Add LOGIN and WEB_APP route constants
13:07 Export the ProtectedRoute module
13:50 Add PrivateRoute to App
15:00 Make Redirect go to SIGN_UP instead
15:15 Testing going straight to the PrivateRoute, /webapp
15:37 Call useHistory hook to navigate after sign up
16:53 Talking to myself about that location parameter
17:05 Testing navigating to /webapp
17:40 Refactoring LoginForm
18:15 Adding Login to our NavigationBar
18:51 Bug fix so our home isn’t WebApp
19:36 useAuth hook in NavigationBar to conditionally render links
19:55 Conditional rendering
20:31 Nav links when there is a user
20:55 Sign out link
21:33 Closing remarks

GitHub Repo Link: https://github.com/carmellemillar/car...

LoginForm.js - https://gist.github.com/carmellemilla...
WebApp.js - https://gist.github.com/carmellemilla...
usehooks/useAuth - https://usehooks.com/useAuth/

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
React JS Tutorial - 04 PROTECTED ROUTE - How to make a private route

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]