Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!