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

144
Views
How to Prevent App Reload using ReactRouter v6 while switching to different route patterns?

In my ReactJs project I have implemented ReactRouter V6 there are multiple routes setup for the application for example I have following routes:

<Routes>
  <Route path="/welcome" element={<SingleArticleById layout={"docs"} articleId={47} />} /> 
  <Route path="/documentation/api/introduction/:endpoint/:articleSlug" element={<Article />} />
  <Route path="/documentation/api/:endpoint/:path" element={<SwaggerArticle />} />
  <Route path="/documentation/:sectionSlug/:articleSlug" element={<Article />} />
</Routes>

the application works fine if you remain in similar route pattern such as

/documentation/api/introduction/:endpoint/:articleSlug

but when you navigate to a different route pattern full application is reloaded as if its a fresh redirect to the application by browser and not navigated by react-router.

similarly if you keep browsing in

/documentation/:sectionSlug/:articleSlug

the application works fine, but when you go to different route pattern the app reloads.

please suggest a solution about this.

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!