Protected Routes in React using React Router

Protected Routes in React using React Router

freeCodeCamp.org

5 лет назад

345,208 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Prince Dikko
Prince Dikko - 10.07.2023 19:24

this method "push() doesn't work in current version of react, can you please upgrade the video to the newer technologies

Ответить
Kehinde Adeleke
Kehinde Adeleke - 05.05.2023 05:44

Amazing 4yr old video that's still relevant today. Thank you for making this.

Ответить
The Best Chill Sounds
The Best Chill Sounds - 18.06.2022 12:55

Please update

Ответить
yao fab
yao fab - 11.06.2022 18:27

HOw is protected if anyone can modify the frontend source code?

Ответить
hafsa el koumikhi
hafsa el koumikhi - 07.06.2022 13:34

thank you so much

Ответить
Ovik
Ovik - 04.06.2022 07:02

does not work in react router v6

Ответить
Muhriddin Xusniddinov
Muhriddin Xusniddinov - 24.05.2022 09:28

it's amazing tuturial

Ответить
Zakia RAHMOUNE
Zakia RAHMOUNE - 18.04.2022 13:10

Very useful .. THanks

Ответить
Elizabeth S
Elizabeth S - 07.04.2022 17:24

Now, I really didn't expect this to end up being a perfect ASMR video

Ответить
OrNah
OrNah - 18.03.2022 11:05

Fell asleep halfway through. Work on your intonation, boss.

Ответить
chan chin chon
chan chin chon - 07.02.2022 13:21

when i was refresh /app profile, thats redirect to homepage. Why? i dont want to redirect from /app to homepage, i want stay in /app after logged in. How can i do it ?

Ответить
Husnain Mehmood
Husnain Mehmood - 03.02.2022 02:13

The isAuthenticated value resets on page refresh. Can anyone tell me how to resolve that issue?

Ответить
ሀሁ tube
ሀሁ tube - 05.12.2021 17:45

thanks this was really help full .thanks alot

Ответить
Shibah
Shibah - 25.11.2021 21:57

Quality content right there! Thanks!

Ответить
Zahid Shaikh
Zahid Shaikh - 23.11.2021 19:02

Thanks bro!

Ответить
Prathamesh Chavan
Prathamesh Chavan - 07.11.2021 07:36

Thanks, good explanation.

Ответить
Akash Shrestha
Akash Shrestha - 25.10.2021 16:19

great

Ответить
Shadman Fatin
Shadman Fatin - 09.10.2021 15:48

Thanks a lot. But it's so complicated 😥😖

Ответить
Ivan Nasonov
Ivan Nasonov - 08.10.2021 12:46

Does anyone know why it resets authentication on page reload?

Ответить
Vignesh Lokeshbabu
Vignesh Lokeshbabu - 07.10.2021 16:29

Hey, Hello all, I need help, so someone please do help me out as soon as possible. I followed this tutorial to implement protected routing in react, but unfortunately, whenever I refresh the page, I'm going back to the login page. Please somebody help me.

Ответить
bharathy nasar
bharathy nasar - 05.10.2021 22:04

Great...it worked. really helpful. thanks

Ответить
nishant gada
nishant gada - 05.10.2021 14:41

Unnecessary complexity, could've been simpler.

Ответить
Joseph Sam
Joseph Sam - 18.09.2021 05:12

Thanks man....

Ответить
Xuxunguinho
Xuxunguinho - 05.09.2021 01:02

thank you very much for the help, but this only works until you update the page

Ответить
Baba Yaga
Baba Yaga - 03.09.2021 14:35

why tf you guys don't use func components and hooks?!!!

Ответить
James Grainger
James Grainger - 14.08.2021 12:45

you'd get a million views if you added asmr to the title :p

Ответить
Benyam
Benyam - 19.07.2021 14:13

It is a free resource but this tutorial needs a lot of rework.

Ответить
Nguyễn Võ Hoàng Long
Nguyễn Võ Hoàng Long - 17.07.2021 06:07

Thank you

Ответить
Rahul Meghani
Rahul Meghani - 07.07.2021 20:28

The way you speak, it might take 2022 to complete the video.

Ответить
TheEthical H
TheEthical H - 28.06.2021 20:55

thank you very much sir

Ответить
Ahmad Yahya
Ahmad Yahya - 23.06.2021 01:13

nice tutorial, thanks

Ответить
Pasindu Pansilu
Pasindu Pansilu - 19.06.2021 22:15

Thank you man. You saved me ❤️

Ответить
Dipen Parmar
Dipen Parmar - 17.06.2021 20:36

Super cool calm,

Ответить
Piriyadarrshan S
Piriyadarrshan S - 14.06.2021 16:24

Thanks, sir its very usefull

Ответить
Shely
Shely - 10.06.2021 00:58

What is the editor name?

Ответить
Yanurmal Rais
Yanurmal Rais - 13.05.2021 18:23

Great tutorial, easy to follow. Btw, what font do you use?

Ответить
Shubham Londhe
Shubham Londhe - 11.05.2021 00:57

man you are awesome!

Ответить
Robin Hayden
Robin Hayden - 29.04.2021 22:15

Very clear explanation, thanks

Ответить
Anmol Singh
Anmol Singh - 28.04.2021 07:58

The true tutorial not like Formula one developer hey look my speed

Ответить
Rohit mahale
Rohit mahale - 11.04.2021 21:19

thanks

Ответить
Ozan
Ozan - 03.04.2021 23:40

This is been very helpful, cleared few questions I had. Thank you.

Ответить
Rafi Hasan
Rafi Hasan - 30.03.2021 23:35

The Video was really helpful........Thanks a million..

Ответить
Akash Chokshi
Akash Chokshi - 24.03.2021 21:37

I tried solving a use case using this approach but could not solve it. Have 2-3 open routes, 2-3 protected-routes, and a wild card route at the end of router switch. The protectedRoute being a component renders everything and starts executing whatever logic is inside it. For example, I hit a wild card route /asd and I want to redirect all wild card route to /home. Since protectedRoute component comes before the wild card route in App.js/.tsx the wild card route is never hit and I am redirected to the else condition logic inside my protectedRoute.

Ответить
Rojan Subedi
Rojan Subedi - 16.03.2021 13:01

I am wondering, what will happen if you pass random url name, when you are still logged in. In my code, I couldnot show 404 page not found in such condition.

Ответить
Dipenparmar12
Dipenparmar12 - 06.03.2021 16:54

Good one. simple and superb .

Ответить
Name
Name - 23.02.2021 19:04

Thank you so much for amazing explanation!

Ответить
Dominik Domagalski
Dominik Domagalski - 20.02.2021 02:55

What names this plugin for dependency management?

Ответить
Dennis
Dennis - 12.02.2021 09:25

Thanks!

Ответить