The New Way To Create Protected Routes With React Router V6

  Рет қаралды 160,120

Dennis Ivy

Dennis Ivy

2 жыл бұрын

Updated version of how to create protected routes in react router v6.
Check out the article that goes with this: / 2c4bbaf7bc1c
Source code: github.com/divanov11/React-ro...
Follow me on twitter: / dennisivy11

Пікірлер: 223
@DennisIvy
@DennisIvy 11 ай бұрын
New video implements this same strategy but with a full backend that handles Sign-in, Logout, and registration here: kzbin.info/www/bejne/pnixqaJ_pLGnlbs
@joaoarthurbandeira
@joaoarthurbandeira 11 ай бұрын
Hey Dennis! First of all, thanks a lot for all the great stuff! Could u do an up-to-date video using React + DRF and how to implement the authentication/register/login with JWT? Maybe a project? Cheers, man!
@ambrosearuwa9458
@ambrosearuwa9458 Жыл бұрын
God bless you @Dennis Ivy I was following your JWT tutorial and got frustrated when you got to the private route part and I spent the entire day on stackoverflow browsing for solutions but found nothing🤣🤣🤣 until I came back to KZbin and searched for "private route" and this video was one of the first that popped up. Thanks
@edwinowino4018
@edwinowino4018 Жыл бұрын
This is a life saver, I was also following the JWT tutorial and I have been stuck on private routes the whole day until i found this.
@southofsleep
@southofsleep Жыл бұрын
Invaluable and straightforward. Like many, I had some older V5 router code that was passing all the components for auth testing into a helper function like this and just couldn't get my head around. Thanks Dennis! :)
@sasidharn323
@sasidharn323 Жыл бұрын
Very valuable information explained in a short video, thank you so much Dennis.
@efeamioku3220
@efeamioku3220 Жыл бұрын
Implemented this for login using Local Storage and it works like magic. Thanks so much, You are my React Protected Route Hero.
@appuser
@appuser Жыл бұрын
Thank you, this was doing my head in. If anyone working on the React Router project sees this, please provide a couple more examples in the docos (could even link to this video if still best practice). There's also scant examples of the redirect _function_ which you can return/throw from loaders, which I suspect replaces or compliments the workflow in this video.
@semico-l-on
@semico-l-on 3 ай бұрын
Thankyou Dennis. I've been stuck for 3 days implementing protected routes. Watched many videos but it was all complicated. But yours got me through!
@pranjulkushwaha8345
@pranjulkushwaha8345 3 ай бұрын
Same with me
@shabalins
@shabalins Жыл бұрын
Great video on this topic! Relevant, clear and helpful. Thanks a lot!
@swapnilcodes
@swapnilcodes Жыл бұрын
One of the best videos on Protected Routes in React Ever ! Loved it !
@anubhavgupta7155
@anubhavgupta7155 Жыл бұрын
Thank You!! I wasn't upgrading my React version because there was not yet a tutorial about React router v6 😂. Now I can happily work on projects with the new version
@ivancastillo161
@ivancastillo161 4 ай бұрын
Thank you so much! Videos with the old outdated router versions are a dime-a-dozen. Couldn't find many other videos that actually explain the new method ^_^
@petarkolev6928
@petarkolev6928 Жыл бұрын
Thanks for the awesome video, Dennis! It was really a time saver
@learningnoobi2156
@learningnoobi2156 2 жыл бұрын
This is really my favourite feature of the new version . I am using this everytime
@jhonesjhonatas5524
@jhonesjhonatas5524 6 ай бұрын
Very good! good teaching, and the fact that I had the github repository helped me a lot, in a few minutes I was able to implement it in my application! Thanks for the content.
@farnazzinnah8541
@farnazzinnah8541 Жыл бұрын
Thanks man!! Imma subscribe you. I have been trying to fix this issue for last 3 days and I finally did it with your help. Really appreciate it! Keep up the good work and keep on helping programmers out
@Ali-Iybar
@Ali-Iybar Жыл бұрын
Thank you for this short and focused video.
@borgestheborg
@borgestheborg 2 жыл бұрын
This video couldn't have come at a better time for me!
@benjaminkhoury304
@benjaminkhoury304 Жыл бұрын
Thanks a lot was looking around for a couple of hours on how to do this, solved the problem I had with this video and a bit of tinkering!
@toppmoviehighlights
@toppmoviehighlights 2 жыл бұрын
Great, video. Direct , incisive and practical.
@mullaarbazzz
@mullaarbazzz 3 ай бұрын
You are life saver man. so on to the point and short and simple video. hatsss off to you
@user-py2vo1gz4t
@user-py2vo1gz4t 9 ай бұрын
thanks for sharing. Just a couple suggestions, you may also want to include dynamic routes(such as id's), and GuestRoutes to redirect the user to home if they are already logged in. But good tutorial with outlet. We used it where I worked at to stack routes and it worked great :)
@smarq86
@smarq86 Жыл бұрын
Thank you! Great explanation. Was helpful in my React app!
@Crossalter
@Crossalter Жыл бұрын
Finally a video make sense! Thanks man, its help me so much to continue lerning about this.
@teksaiyanhere
@teksaiyanhere Жыл бұрын
Thanks a lot man you made my day, i got stuck with this issue for a whole day and this video just fixed it, Thanks a lot mate :)
@ahsanahsan1087
@ahsanahsan1087 10 ай бұрын
Thank you for taking up this we want more videos like this really good bro
@GMCorner
@GMCorner Жыл бұрын
I was looking for this for so long. Thank you for the video
@haseebalam9174
@haseebalam9174 4 ай бұрын
This video helped me a lot as I was building a MERN Stack application
@bingewatcher144
@bingewatcher144 Жыл бұрын
This is the only yt video in which the Outlet is perfectly explained❤❤
@OscrGarcia
@OscrGarcia Жыл бұрын
Thank you so much for explaining this, I was finally able to make it work!
@Lotpite
@Lotpite Жыл бұрын
Really thank you for this information, really simple and useful explanataion!!!
@chiho8119
@chiho8119 Жыл бұрын
I was looking for a simple but reliable solution, but this is good to go. Maybe I want to use something like a map function which loops through the object of routes with the responding path names and so on. But need to figure out how, but this solution helps me a lot.
@PaulAilincai
@PaulAilincai 7 ай бұрын
This video helped me fix my UX and consequently improve security on my product
@Smarteez83
@Smarteez83 Жыл бұрын
So much time saved with this video ! Per-fect !
@muhammad_abir
@muhammad_abir 2 жыл бұрын
thanks a lot dennis..... I was very confused until watch this video
@HimanshuSharma-pz9gv
@HimanshuSharma-pz9gv Жыл бұрын
hey dennis you just saved my big project , Kudos : )
@akomaningemmanuelsunday8424
@akomaningemmanuelsunday8424 Жыл бұрын
Sir Dennis, all I can say is God richly bless you, sir Thank you
@harshasrisameera8164
@harshasrisameera8164 Жыл бұрын
Life saver, It worked without a blink thank you so much
@unyuzimfuraishimwejoykevin4812
@unyuzimfuraishimwejoykevin4812 Жыл бұрын
Quick video, Self-Explanatory, Made me hit the Subscribe button 😁😁
@fortniteplaystation9050
@fortniteplaystation9050 9 ай бұрын
Really looking for a video like this , thanks a lot
@ignaciofreitas8183
@ignaciofreitas8183 Жыл бұрын
Bro you rock! Thank you so much for avoiding me some headaches :)
@jaguilar718
@jaguilar718 Жыл бұрын
Very straightforward, thank you!!!
@martincho111986
@martincho111986 2 жыл бұрын
thank you very much!! this was very useful, you explanation was very great and understandable!!, comparin with others videos, so thanks again
@hypermeero4782
@hypermeero4782 2 жыл бұрын
man, you saved me. THANK YOU!
@natcoziay
@natcoziay Жыл бұрын
Thank you SOOOOOOOOOO Much! This was a life saver! Wish I could give you a hundred more likes.
@entertechinc
@entertechinc Жыл бұрын
Great video Dennis. Thank you
@TheOnkard
@TheOnkard 2 жыл бұрын
Loving React content from you sire 👑
@rohit87k
@rohit87k Жыл бұрын
Thank you so much - you saved mine lots of time ✅
@Txushin
@Txushin Жыл бұрын
Awesome video, really clear, thanks!
@FGA-47
@FGA-47 Жыл бұрын
Thanks Dennis that was really helpful.
@Septumsempra8818
@Septumsempra8818 Жыл бұрын
You just saved me from hours of banging my head on the desk and questioning the futility of my dreams.
@sushantabhowmick1031
@sushantabhowmick1031 11 ай бұрын
Love you man , Osm explanation with your documentation
@tayyabhaseeb8866
@tayyabhaseeb8866 8 ай бұрын
Amazing video invaluable and straightforward ❤
@truecallerbackup8392
@truecallerbackup8392 2 жыл бұрын
Thanks for informative video I'm understood everything is about auth thanks
@hilkiahlavinier
@hilkiahlavinier Жыл бұрын
Thanks much!! Just what I was looking for
@FilipeFernandes-ic3os
@FilipeFernandes-ic3os Жыл бұрын
Perfect! Thanks a lot for the explanation!
@mikhailsmirnov8539
@mikhailsmirnov8539 Жыл бұрын
That's great, thanks a lot! This was a life saver really!
@yannickdurden
@yannickdurden 7 ай бұрын
Straightforward, thanks for the video 👌
@olalekanemmanuel6767
@olalekanemmanuel6767 Жыл бұрын
This is a lifesaver, I can't wrap my head around the new version, too many changes. I'll just stick to this for now
@ValeryTeramin
@ValeryTeramin 4 ай бұрын
Thank you, it is exactly what I was looking for
@harekrishna4584
@harekrishna4584 Ай бұрын
i dont why this channel is so underated omgggg!!! this guy is awesome
@DennisIvy
@DennisIvy Ай бұрын
☺️
@alex_law_codes
@alex_law_codes 4 ай бұрын
Thanks this was a really clean video!
@devlifeaz
@devlifeaz 4 күн бұрын
So good for me. Thank you man! You are really hero :)
@KKYT-fc3bu
@KKYT-fc3bu 4 ай бұрын
Thank you so much. without any doubt i fully understand it and it did really work.
@mubashir2859
@mubashir2859 Жыл бұрын
Thanks for quick help
@ElrondMcBong86
@ElrondMcBong86 Жыл бұрын
Awesome! quick and clear! :-)
@speedofbytes
@speedofbytes Жыл бұрын
Very cool man, interesting, used this logic in a app of mine
@HarishGGU
@HarishGGU Жыл бұрын
very helpful video. thanks so much.
@XXlikeabauss
@XXlikeabauss 10 ай бұрын
Really good video, thanks Dennis
@juanchoprogramacion
@juanchoprogramacion Жыл бұрын
Thank you, great work!
@sarfaraz6582
@sarfaraz6582 11 ай бұрын
Woow this is good i was actually rendering every component based on user authentication which is pretty inconvenient way
@sirjschool7926
@sirjschool7926 Жыл бұрын
This helped me out a lot!!
@fellypsantos_
@fellypsantos_ Жыл бұрын
Thanks friend! Helped a lot !! :D
@LAITO1222
@LAITO1222 Жыл бұрын
thank you! now i know how to create a private route.
@mathewsaraujo2293
@mathewsaraujo2293 Жыл бұрын
Thanks, this video helped me a lot!
@crissatrapi3933
@crissatrapi3933 10 ай бұрын
Thanks!!! this was a very good explanation for beginners like me ☺. However I couldn't manage to do the opposite (block the login and signup page when logged in). I'm going to read more info about it
@aliahmedkhan9690
@aliahmedkhan9690 Жыл бұрын
Great video. Btw if you're having You cannot render a inside another . You should never have more than one in your app. error. Just remove the around the and change it to .... This worked for me.
@TheJenasandeep
@TheJenasandeep 11 ай бұрын
Great Explanation!
@matheuscarvalho87
@matheuscarvalho87 Жыл бұрын
You saved my life!! Thanks a lot!!!
@IzharJumadi
@IzharJumadi Жыл бұрын
awesome video, thanks for sharing!
@ayushgogna9732
@ayushgogna9732 Жыл бұрын
thanks glad someone has a answer
@aruns6214
@aruns6214 2 ай бұрын
Most underrated channel😢😢😢
@JumaInTech
@JumaInTech Жыл бұрын
exactly what I need ed mahn. Thanks a lot😀
@xtremewolve
@xtremewolve Жыл бұрын
Wow, awesome explaination
@programmingwithnit5308
@programmingwithnit5308 Жыл бұрын
Thank you brother
@saulbenavides4037
@saulbenavides4037 Жыл бұрын
Thanks for sharing!
@aripovjr
@aripovjr 11 ай бұрын
Thank you Dennis
@_MoshikoAz_
@_MoshikoAz_ Жыл бұрын
thank you for the video, i have a question tho, how would you recommend to store the token, to maximize the security in the app ? assuming i already have a backend to handle the token for me
@Aliena92
@Aliena92 Ай бұрын
Thank you so much! Will you please make a video about website architecture/MVC?
@atalkrishna
@atalkrishna 2 жыл бұрын
This is awesome. neat and simple. Subscribing right away....👏👏👏
@bryang3044
@bryang3044 Жыл бұрын
Very, very, nice video. Thank you.
@hasanmahmood2001
@hasanmahmood2001 Жыл бұрын
Very well explained!!!
@farhadmirzaei8960
@farhadmirzaei8960 Жыл бұрын
Great Video , Thanks man
@Kv2.6
@Kv2.6 3 ай бұрын
Thank you brother!!!
@masudranahimu3783
@masudranahimu3783 Жыл бұрын
really good and informative video
@billy_azzztec
@billy_azzztec Жыл бұрын
Thank you so much!
@rafaelceballos8433
@rafaelceballos8433 Жыл бұрын
That looks simple and easy. As a beginner, I am looking at everything. Can you do this with an actual login page example? I mean logging in as a user?
@voducthang16
@voducthang16 Жыл бұрын
Nice video!!! Thank you
@hajamohiyadeen4741
@hajamohiyadeen4741 11 күн бұрын
Thanks, it's very helpful
@alexeyshaykov
@alexeyshaykov Жыл бұрын
Thanks a lot. U save my day!
@d0gl0gic80
@d0gl0gic80 Жыл бұрын
This is fantastic thank you
Custom Protected Route Component in React
10:58
Cosden Solutions
Рет қаралды 35 М.
React protected routes in 4 minutes
4:03
Appwrite
Рет қаралды 3,8 М.
🌊Насколько Глубокий Океан ? #shorts
00:42
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН
UFC Vegas 93 : Алмабаев VS Джонсон
02:01
Setanta Sports UFC
Рет қаралды 213 М.
Refreshing Tokens With Axios Interceptors
39:55
Dennis Ivy
Рет қаралды 86 М.
Learn React Router v6 In 45 Minutes
46:20
Web Dev Simplified
Рет қаралды 529 М.
Private and Protected Routes in React (using React Router v6)
24:05
Studytonight with Abhishek
Рет қаралды 9 М.
React router crash course
55:54
Hitesh Choudhary
Рет қаралды 30 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 151 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
This React UI Library is GAME CHANGER!
18:13
developedbyed
Рет қаралды 516 М.
Укус ядовитой змеи😱 #simpsonsway
0:20
SimpsonWay
Рет қаралды 4 МЛН
Children deceived dad #comedy
0:19
yuzvikii_family
Рет қаралды 3,4 МЛН
Tom & Jerry !! 😂😂
0:59
Tibo InShape
Рет қаралды 42 МЛН
staff uses the cart for other purposes 🦄 🛒❤️‍🔥
0:12
iPolina Queen of the Cringe 👑
Рет қаралды 11 МЛН