Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

247
Visualizações
How to prevent downloading unnecessary pages in next js?

I have a problem in nextJS. I entered my website url and i went to my main page of website. I opened chrome devtools and i went to network tab. I saw that other pages had been downloaded! But i was in main page and i didnt go to any other page. Whats the problem here? How can i prevent something like this? Because it makes big problems in large apps! So my question is how can i prevent downloading unnecessary pages in nextJS? for example in plain react we could use React.lazy to download some components when we need them. we could use this method to prevent downloading unnecessary pages and components. like this exmple:

//App.js
import React, { Suspense } from "react";
import { Route, Routes } from "react-router-dom";
const SupportPage = React.lazy(() => import("./Components/SupportPage"));

const App = () => {

   return (
     <div>
        <Suspense fallback={<p>loading the page...</p>}>
           <Routes>
              <Route path="/support" element={<SupportPage />} />
           </Routes>
        </Suspense>
     </div>
   )

}

but here, how can we do something like this? i have no idea about it. Thank you for helping.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda