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

145
Vistas
Confusion about code splitting and lazy loading in React

I was looking into code splitting and lazy loading in the react docs where it mentions that

The lazy component should then be rendered inside a Suspensecomponent, which allows us to show some fallback content (such as a loading indicator) while we’re waiting for the lazy component to load.

I am not super clear on the meaning of `load` here - does it mean loading into the memory or fetching over the network and load into the memory?

If it defers the fetching, then how do we know which endpoint to hit to fetch the split chunk from when the component is needed?

I came across this demo on codesandbox where it has every tab lazily loaded

const Tab1 = lazy(() => import("./components/tabs/Tab1"));

const Tab2 = lazy(() => import("./components/tabs/Tab2"));

const Tab3 = lazy(() => import("./components/tabs/Tab3"));

const Tab4 = lazy(() => import("./components/tabs/Tab4"));

But by checking the network tab, I don't see new requests coming out when I switched the tabs. Am I missing the point of code splitting and lazy loading here?

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