How To Redirect in React Tutorial - V6+

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 79

  • @westernpigeon
    @westernpigeon 2 года назад +12

    that’s insane dude i was just having a problem with Navigate and useNavigate last night and i didn’t understand the difference and then you release this video!!!! thanks !!

    • @PedroTechnologies
      @PedroTechnologies  2 года назад

      Glad I could help!

    • @JoshuaMusau
      @JoshuaMusau Год назад

      @@PedroTechnologies i need help, i see this works for functional components, but how does it work in class components?

  • @gabrielsimiownato
    @gabrielsimiownato 2 года назад +5

    Cara, eu juro que fiquei de cara quando descobri que você é brasileiro. Estava me aventurando vendo vídeos seus sobre React e JavaScript e você simplesmente tem os melhores tutoriais do tema. Valeu ai por toda ajuda que você proporciona a todos nós. Tive que estudar por conta própria lendo as documentações pra aprender como usava o novo react router v6 e certamente se você tivesse postado o vídeo alguns dias antes, teria me salvado mais uma vez kkkk. Mas mesmo assim vou ver seu vídeo para ver a sua didática e tenho certeza que não vou me arrepender!!

  • @binyamgetachew1656
    @binyamgetachew1656 2 года назад +1

    keep these videos coming bro even if you aint getting that many views we got your back and you are really helping us we will support you

  • @Dapr071
    @Dapr071 7 месяцев назад +1

    I’m doing an online shop for a final project and I need to have the navigation done with router. When I do it puts me a error of Cannot read properties of null (reading ‘useRef’) i don’t know how to do it. Can someone help me please?

  • @ayomidestephen3234
    @ayomidestephen3234 2 года назад

    this is a very good tutuorial, simply implies that Navigate is declarative while useNavigate is imperative.

  • @craiggazimbi
    @craiggazimbi 2 года назад +1

    Thank you lol , had bumped into your old one lol, code was breaking , glad u made an update , thanks mate!

  • @loudcapricorn5513
    @loudcapricorn5513 2 года назад

    Looked out many places about how to redirect inside a component in v6 but didn't find the correct answer.
    Got it here thanks :)

  • @craiggazimbi
    @craiggazimbi 2 года назад +1

    Predo!!!!!!!!!!!!!!!!!!!!!!!!!!!! you the man, hey man, when i see u in person , remind me to get you a cold one, I don't care if you do not drink , that day you will take a glass for me. Shout out to you man

  • @niveditha1805
    @niveditha1805 Год назад +1

    Thank you so much for this tutorial.

  • @alexisk5978
    @alexisk5978 2 года назад +2

    THANK YOU !!!! you are a life saver !!

  • @nevilmistry740
    @nevilmistry740 2 года назад +2

    Pls give me any suggestions or makes video on its. Your videos are very informative.

  • @gabrielmaciel2891
    @gabrielmaciel2891 2 года назад +4

    Pedro se der, faz um tutorial de react router de como fazer uma rota pra um modal, eu consegui implementar aqui mas n sei se foi da melhor forma, e no RUclips não tem nenhum tutorial disso.

    • @PedroTechnologies
      @PedroTechnologies  2 года назад +1

      Geralmente quando eu uso modals eu nao crio uma rota nova, porem o que vc pode fzer é ter nested routes. Eu fiz um video neste assunto.

    • @gabrielmaciel2891
      @gabrielmaciel2891 2 года назад

      @@PedroTechnologies Vou ver, o modal que eu fiz precisava mostrar os dados de um User que vinha da Api e que poderia ser acessado pelo id, era oq o desafio pedia pelomenos kk, ai tive que criar uma rota pra cada

    • @Davi-wv8mi
      @Davi-wv8mi 2 года назад

      rota para um modal, geralmente e tira e poe componente, existem libs que gerenciam esses steps, ou voce pode fazer do seu jeito

  • @Alex-zi1gb
    @Alex-zi1gb Год назад

    Great video! Short and easy to understand. Thanks for that!

  • @shahriarimon6543
    @shahriarimon6543 2 года назад

    Thank you Pedro for clear my confusion

  • @61.pranamyajoshi23
    @61.pranamyajoshi23 Год назад

    Thanks man, This was really helpful

  • @qgatss
    @qgatss 2 года назад

    Pedro, i owe you a benz man. You keep me going fr, i really appreciate your work. You should add a link so we can buy you a cup of coffee.

  • @quangtruong8367
    @quangtruong8367 9 месяцев назад

    It's very helpful for me. Thanks for your video!

  • @nehat786
    @nehat786 2 года назад +3

    Hello sir I got a question.
    Lets say there is a page A which is protected routes. If any user is not logged in and visit that A page, it will automatically redirect to the Login page. After login how would I send that user to previous page where he was before. I tried to search and found one solution using useLocation but it’s quite confusing. It would be great if you make a video.

    • @PedroTechnologies
      @PedroTechnologies  2 года назад +1

      React router keeps track of the location history. The useLocation hook can be used to do something like this I believe. I might be able to make a video on this, but in the meantime I would say to keep searching it :)

    • @Chriss-cn1ch
      @Chriss-cn1ch 2 года назад

      navigate(-1)

  • @dnyaneshkale9540
    @dnyaneshkale9540 2 года назад +1

    Nice video bro. Can you please tell what extension do you use for code completion suggestions. I hope you get what I mean

  • @federicomerino6141
    @federicomerino6141 Год назад

    Brilliant explanation. Thank you so much!

  • @bspraveen8212
    @bspraveen8212 2 года назад +2

    Brilliant work once again from you. Thank you for bringing such good video on Navigation. Please do such video on Pagination in React because the way you explain will reach to many developers

  • @leetebbo3209
    @leetebbo3209 2 года назад

    Great video. Really helped me in my project. Thankyou

  • @nikhilsrinath18
    @nikhilsrinath18 Год назад

    ohh my god how can I thank you for this...thanks man!!!

  • @iam_djumanov
    @iam_djumanov 2 года назад

    Nice lesson Keep teaching

  • @hajerbetabessi3485
    @hajerbetabessi3485 Год назад

    brilliant video thanks for sharing !

  • @hiwotina26
    @hiwotina26 2 года назад

    How do you recommend to learn and master React? Any react idea that i can try from scratch by myself?

  • @AndreSpecht
    @AndreSpecht 2 года назад

    Hey. Do you a video showing how to create and deploy an API? I'd like to create my own API (just for consuming data) and deploy it using Netlify

  • @정수영-q4w
    @정수영-q4w 2 года назад

    hi!!! thank you so many videos :) i wanna see video of REDIS!! If u have much time then could u make video of REDIS?

  • @matthewtse3283
    @matthewtse3283 2 года назад

    Hi Pedro will you ever do a tutorial on how to use nextjs with typescript? Much appreciated! Your videos are super helpful.

  • @rodofdz1974
    @rodofdz1974 2 года назад +1

    Pure Gold !!!

  • @CloudyyYT
    @CloudyyYT 2 года назад

    awesome video. can you tell me what font do you use in vscode

  • @kovalsky3531
    @kovalsky3531 2 года назад

    Awesome Tutorial. Would love to see you in another tutorial with implementing Coinbase Commerce in React. Haven't seen any tutorial about it in youtube. Hope you consider it. Thank you

  • @afrarshaikh1888
    @afrarshaikh1888 Год назад

    How to redirect in class component buttonHandler after some api response

  • @SairamDasari2000
    @SairamDasari2000 8 месяцев назад

    You are a gem

  • @oneness2728
    @oneness2728 2 года назад

    I tried to use the useNavigate but it gave me an error saying useNavigate is called in function "navigate" that is neither a react function component nor a custom react hook function.
    Why is that

  • @nevilmistry740
    @nevilmistry740 2 года назад +2

    Hey bro which kind of project I make in react.

    • @westernpigeon
      @westernpigeon 2 года назад +1

      whatever you’re interested in

    • @PedroTechnologies
      @PedroTechnologies  2 года назад +1

      In my opinion, try doing whatever you feel like you will have fun doing. I remember when I started I would just come up with crazy ideas and keep trying until I was able to do it.

  • @VURGINN
    @VURGINN 2 года назад

    Pedro can you make a video where you talk about filtering objects depending on category using checkboxes please.

  • @miesineagent
    @miesineagent 2 года назад

    Sir this is exquisite

  • @manade_edi_antha
    @manade_edi_antha Год назад

    Thank you brother..... ❤

  • @kathikr9360
    @kathikr9360 9 месяцев назад

    thank you pedro

  • @ayomidestephen3234
    @ayomidestephen3234 2 года назад

    In the about page where you used an if statement to check if its true or not, can i use a Tenary operator like {goToContact ? : null}

    • @Chriss-cn1ch
      @Chriss-cn1ch 2 года назад

      Yea I usually use it to Check if user is logged in the routes.
      Path login for example
      Element={user? : }}

  • @ThColinPereira
    @ThColinPereira 2 года назад

    Super helpful

  • @Banksy_said_hi
    @Banksy_said_hi 2 года назад

    Thanks a lottt!

  • @ammar_qassab
    @ammar_qassab 2 года назад +1

    thank you so much

  • @dragosp.7635
    @dragosp.7635 2 года назад

    How do I redirect to an external link like facebook?

  • @Izaacxavier
    @Izaacxavier 2 года назад

    Thank you

  • @beo1259
    @beo1259 Год назад

    GOAT

  • @SXia-gd5vb
    @SXia-gd5vb 2 года назад

    so fantastic

  • @РасулМырзакулов-э8и

    Intro music name please?

  • @AshwinChandarR
    @AshwinChandarR 2 года назад

    Are you open to freelancing?

  • @dheerajtp5701
    @dheerajtp5701 2 года назад +1

    Bro will you try to create a payment with payment gateway using express and react ?

  • @augischadiegils.5109
    @augischadiegils.5109 2 года назад

    ❤️❤️❤️❤️❤️❤️

  • @mrnabby4178
    @mrnabby4178 Год назад

    Your previous one didnt work. Hope this one will.

  • @bilalch898
    @bilalch898 2 года назад +1

    I bet it takes literally less than a minute to tell how react router dom Redirect works.

    • @PedroTechnologies
      @PedroTechnologies  2 года назад +1

      Yeah, but tbh this is an explanation video and not a walkthrough. At least for me, in the beginning, I didn't like just reading documentation since I wouldn't fully grasp the subjects. I try to make videos explaining how I would've liked to learn when I started. There are many different types of learners, this video might not fit your type. I appreciate the constructive criticism! I honestly have made so many changes to my channel because I listened to comments like yours, and it has improved how i teach :)

  • @bspraveen8212
    @bspraveen8212 2 года назад

    Kudos to your interest and excellent explanation. Keep doing such tutorials. Best channel to learn React concepts in lucid way is @Pedro tech

  • @Cruzylife
    @Cruzylife 2 года назад +1

    ur quality and voice has significantly impropved.

  • @mohamuddahir5772
    @mohamuddahir5772 2 года назад +2

    Thanks again for your help and support 🙏 👍 😊 🫂 😊

  • @chinonsookafor5427
    @chinonsookafor5427 2 года назад

    Hello PedroTech . Why does nobody ever tell us how they know that the URL for the Contact page(that is contact.js) is "/contact". Unilike in flask where we explicitly write the URL before the function, I never see it in your code. So how do you know it's "/contact"

    • @PedroTechnologies
      @PedroTechnologies  2 года назад

      We define the url when we define our routes. Every component has a path prop in it. U just have to write which path u desire there and it will work. For example:

    • @chinonsookafor5427
      @chinonsookafor5427 2 года назад

      @@PedroTechnologies I understand it now. Thank you so much.

  • @jonnyelbert6772
    @jonnyelbert6772 2 года назад

    Tools to get cc easy in yt leakfullz

  • @ferreiraalan13
    @ferreiraalan13 8 месяцев назад

    Thank you so much

  • @kathikr9360
    @kathikr9360 9 месяцев назад

    thank you