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
hey it's not working in my case it is showing import error
React-router has a major update in v6 and history is no longer available in React-router
You can use useNavigate instead of history.
@@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 ???
Okay sure, do you want me to made a video on this?
@@SmurtiranjanSahoo yes, please I was using redux so if you follow reducer , action methods it would be great.
Thank you so much for your helpful video!! Thanks to your simple description , I could solve the problem with short time.
Bro thank you so much!! was stuck on this for 2 days...Keep up the good work :)
My error says
You should not use (componentname)outside a
thanxx a tonn :)
Thanks
thank you sir
I am using version 6 how to use bro😢
OMG thanks finally!!!
Thanks I was stuck on this
heeelo bro not working out for me ,even my react router dom is 5.3.0 version.
You should not use outside a this is the error after using withRouter
Hello I have the same probleme, have you find the solution ?
Thankyou so much bro
react route dom v6.6.2 can't do this
Can you help me
thanks , doesn't work