TypeError: Cannot read property push of undefined | react router dom history.push

Поділитися
Вставка
  • Опубліковано 4 жов 2024
  • Fix: TypeError: Cannot read property push of undefined
    __________________________________________
    ▶️ Say "Hello🙋‍♂️" to me On:
    🔸 Facebook : trtechl...
    🔸 Instagram : / trtechlesson
    🔸 Twitter : / smurtiranjan_s
    ▪️For Business Enquiry : trtechlesson@gmail.com

КОМЕНТАРІ • 24

  • @anubaby7636
    @anubaby7636 2 роки тому

    hey it's not working in my case it is showing import error

    • @SmurtiranjanSahoo
      @SmurtiranjanSahoo  2 роки тому

      React-router has a major update in v6 and history is no longer available in React-router

    • @SmurtiranjanSahoo
      @SmurtiranjanSahoo  2 роки тому +1

      You can use useNavigate instead of history.

    • @sandeepk6294
      @sandeepk6294 2 роки тому

      @@SmurtiranjanSahoo can you tell me how to do with useNavigate. I'm trying but i didnt get redirection.
      In my case i created separate file for CRUD actions the operation was perform with Database but the page is not redirecting getting the Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'data') errror.
      Can you help with this ???

    • @SmurtiranjanSahoo
      @SmurtiranjanSahoo  2 роки тому

      Okay sure, do you want me to made a video on this?

    • @sandeepk6294
      @sandeepk6294 2 роки тому

      @@SmurtiranjanSahoo yes, please I was using redux so if you follow reducer , action methods it would be great.

  • @naoyahirano6616
    @naoyahirano6616 2 роки тому

    Thank you so much for your helpful video!! Thanks to your simple description , I could solve the problem with short time.

  • @devalsonkusare7079
    @devalsonkusare7079 3 роки тому +1

    Bro thank you so much!! was stuck on this for 2 days...Keep up the good work :)

  • @amalkurup6947
    @amalkurup6947 Рік тому +1

    My error says
    You should not use (componentname)outside a

  • @pradnyad1234
    @pradnyad1234 2 роки тому +1

    thanxx a tonn :)

  • @GrowWithSaksham
    @GrowWithSaksham Рік тому

    Thanks

  • @WEOOLTECNOLOGY
    @WEOOLTECNOLOGY 3 роки тому +1

    thank you sir

  • @noorulsubathani8396
    @noorulsubathani8396 Рік тому

    I am using version 6 how to use bro😢

  • @himadul1636
    @himadul1636 2 роки тому

    OMG thanks finally!!!

  • @iosfactory
    @iosfactory 2 роки тому

    Thanks I was stuck on this

  • @nitishhh
    @nitishhh 2 роки тому +1

    heeelo bro not working out for me ,even my react router dom is 5.3.0 version.

    • @nitishhh
      @nitishhh 2 роки тому +1

      You should not use outside a this is the error after using withRouter

    • @byleo2861
      @byleo2861 2 роки тому

      Hello I have the same probleme, have you find the solution ?

  • @saqibghouse
    @saqibghouse 2 роки тому

    Thankyou so much bro

  • @midyourbae
    @midyourbae Рік тому

    react route dom v6.6.2 can't do this

  • @mohamedbenamarbatoula3185
    @mohamedbenamarbatoula3185 Рік тому

    Can you help me

  • @giovannaramos3239
    @giovannaramos3239 Рік тому

    thanks , doesn't work