Protected Routes in React using React Router

preview_player
Показать описание
In this video, we will create a protected route using React Router. This route is accessible only when the user is logged in.

--

Рекомендации по теме
Комментарии
Автор

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

adeleke
Автор

Thanks - this was really helpful. I like that you kept everything simple and didn't get overly complicated, that made it very easy to pick up the concept and start coding.

olendaelhousen
Автор

if anyone is using routes with children:
e.g.
<ProtectedRoute path="/homepage">
<Component1/>

<Component2/>
</ProtectedRoute>

then do this:


import React from "react"
import {Route} from "react-router-dom"


const ProtectedRoute = ({children, ...rest}) =>{
return (
<Route {...rest}>
<>{children}</>
</Route>
)
}
export default ProtectedRoute;

suketupatel
Автор

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

Elliewebd
Автор

Mention of "withRouter" saved my live🙏🏻🙏🏻🙏🏻🙏🏻

vishwasr
Автор

omg i've been looking this for 2 hours, thank you a lot :DDD

stevendiaz
Автор

Thank you so much for such a beautiful Video....Had not slept since last night since I was trying to do it by reading Documentations...You're so great....Wish I had explored this thing before!!

bidhyapokharel
Автор

Thanks, Bruh. You did justice to this topic. Cleared all doubts

simonkalu
Автор

10/10 honestly, great video and explanation!

morapedimasima
Автор

Sir, You pick an easy way to teach, I like this, Few can do this.
It is very hard to teach simple.

ankitavay
Автор

Really efficient tutorial man! thanks for your help, cheers from Brazil ;)

erichcasagrandeperusso
Автор

Thank u from Colombia. It was very helpful for me

MrEdward
Автор

the best tutorial on React Router I saw... nice broth

ricardinhofreestile
Автор

I really like this tutorial. It's perfect ! Thank you very much ! :)

Jwaana
Автор

You solved my problem. Thanks so much!

TS-qfkm
Автор

smooth voice and clear explanation.thanks

recepozturk
Автор

Just like what I need <3 Thanks mate!

chrisdanevalla
Автор

Really awesome video
Very simple and subjective

nagarajukp
Автор

Thanks you very much for the video. i got stuck with this issue and you helped me solve it

kingofgods-wt
Автор

Best tutorial I saw for react router can u make video on design patterns in react

ashishchiluka