Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
I expect to get an error when I close(unmout) a component that fetchs data

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).

enter image description here

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

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda