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

214
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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