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

212
Views
React Router: Force actual render of library components after navigation (SPA)

I have a generic problem whereby whenever I add React Router into one of my React project it proceeds to break other libraries ability to render, typically being packages from NPM such as Apex Charts and JQuery's JVectorMap.

If I refresh the page the above mentioned libs work, however when we do an SPA navigate (don't actually refresh or change the page, just swap out some active view) it cannot render these components.

The more libs I use for my components the more seem broken, which is why it leads me to believe this is an issue with React Router. Is there a way to force a sort of refresh on page load with React Router to resolve this issue?

I have come up with some hacky solutions like firing events on component mount that force a refresh or resize of the page, but this does not feel like the correct way to handle this problem. Please advise.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

SOLVED: just use react wrappers for libraries that have them. In my case both Apex Charts and Jvectormap have solid wrappers written for React on npm. Now when I use them it can handle reloading on navigation just fine :)

I suspect this was in fact an issue with React (perhaps v18 strict mode) and not React Router, although I can't say for sure.

about 4 years ago · Santiago Gelvez Report
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!