How to create Protected Routes and Authentication with React Router V6 2023

preview_player
Показать описание

In this video, we'll be learning how to create protected routes and authentication with React Router V6. Private routes allow us to control how specific paths are accessible, while authentication provides a secure way to ensure only authorised users can access our content.

By the end of this video, you'll be able to create private routes and authentication in React Router V6, ensuring that your users are protected while they access your content

Using React Router V6 we'll put together an App that has:

1. Authentication wrapper using useContext and useReducer
2. A custom component to build our routes and menu options
3. A login page that calls a login function from our Auth Wrapper
4. Dynamically build and set our menus and routes depending on the user's status

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

This video is just pure gold! Straightforward, concise, without any useless information. Amazing!

vPopovPHX
Автор

Amazing video! I love how there are people like you that go straight to the point and explain in plain English. Thanks a lot for the video! PS: Better teaching methods than my university (will definitely suggest to my friends)!

wphtyyj
Автор

straight and easy to understand thanks for the video.

AIwithChinmay
Автор

You deserved more subscribers. You are a good example on what the developers should follow. I haven't followed yours but I created something that is similar and in tsx.

samontefrankamirsong.
Автор

This is a super useful video!!!, went through it, understood how everything is done, great video!!!

theonlymaster
Автор

your content is amazing seriously. i learned so much from this single video of yours,

raheelafzal
Автор

Nice, simple, to the point.

Thanks!

FreddyF
Автор

Good luck with your channel. Liked your content

georgekopadze
Автор

yo bro

thank u sooo much, i every day look yt, and try to learn something new, and u speak very easy for me! (sorry for my eng)
gl bro at ur way!

retrabaud-it
Автор

Excellent Thank you very much 🤓 I would love to see another tutorial with your implementation of local storage.

frankie_goestohollywood
Автор

I enjoyed the video and your accent, as well as learned from you

tanercoder
Автор

Cool video! Simple and well explained! It would be very helpful to see an implementation with local storage as well as role-based authorization. Regardless, thanks for the awesome content!

jonasmunkchristensen
Автор

It's amazing! thank you very much!

alexandrejunior
Автор

i love it great knowledge been passed here, thanks a lot

johnmarynwanze
Автор

Gold Gold Goldberg !! Happy to find this channel !!

vaibhavdani
Автор

can you help me to do same thing in next.js,
i have to do with user role based, their tho 2 user role, so how to do in next.js with typescript?

webhybrid
Автор

Great content. Please release a video about refresh and access tokens

isaacjon
Автор

Why are the extension files `.js` instead of `.jsx`?

alonsoestevam
Автор

Please I need a tutorial on how to use localstorage with this

itsLarryAlright
Автор

can you make a new video on how not to make user logout whenever the page refresh?

hankpham