I'm learning in 'The Net Ninja' about routes and navigating between the pages.
In there a component does data fetching and if we navigate(from the Home page) to another page(New Blog), before completing fetch, it gives an error. (Can't perform a state updating over an unmounted component).
So used an Abort Controller
and cleanup function
to fix it (To stoping fetching after unmounting the component).
But I don't get any error even without using from Abort Controller
and cleanup function
. So why?
1- please navigate to New Blog
2- Then navigate to Home
3- Then Quickly navigate to New Blog again. (before loading data)
This should give the above error.
Is it for a different versions? In there: RRD: 5.2.0 && react: 17.0.1
and for me: RRD: 5.3.3 && react: 18.1.0
It's project: https://codesandbox.io/s/complete-react-tutorial-forked-c7onv3