10 - Protected Routes and Authentication with React Router

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • ► Check out screencasts.al... for more episodes!
    ► Learn to build your own production-ready React applications and become a successful React developer: alterclass.io/...
    ► Be on top of the best and hottest web technologies: alterclass.io/...
    --
    You'll often need to protect some pages of your application and display them only if the user is authenticated. So, in this lesson, you'll learn how to create a custom and reusable ProtectedRoute component to protect your routes using React Router.
    Buy me a coffee: www.buymeacoff...

ความคิดเห็น • 12

  • @imikhan83
    @imikhan83 3 ปีที่แล้ว +3

    Simple and clean. Thank you

  • @De_Bryan
    @De_Bryan 2 ปีที่แล้ว +1

    New to react..how did you implement the sign in/out button? Mind sharing the code? ;)

    • @alexlions8633
      @alexlions8633 2 ปีที่แล้ว

      I am also wondering about it , it seems somehow miser developer`s job :)

    • @alexlions8633
      @alexlions8633 2 ปีที่แล้ว

      And also if you just install npm i react-router and then look at your package.json file it says v6 but this video is all about v5 if you want to install v5 then I suggest you to write npm i react-router-dom@5.0.0 then you will no longer get any errors :)

  • @De_Bryan
    @De_Bryan 2 ปีที่แล้ว

    Clear and precise. Thanks.

  • @zeniths823
    @zeniths823 2 ปีที่แล้ว

    it would have been better if you provieded link to your github page

  • @DaAznT
    @DaAznT 2 ปีที่แล้ว +6

    This is outdated. Redirect is depreciated in react router

  • @IkhfanYusuf
    @IkhfanYusuf 2 ปีที่แล้ว

    How to create protected routes in react router v6?

  • @thebestchillsounds4780
    @thebestchillsounds4780 2 ปีที่แล้ว +1

    Why are you using outdated react router?

  • @chhotureunited3008
    @chhotureunited3008 2 ปีที่แล้ว

    code .... pls

  • @kavalisuresh8670
    @kavalisuresh8670 3 ปีที่แล้ว

    Code please