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

189
Vistas
Render Fushion Charts in React SSR

Is there any way to render fushion charts on server side in react ? . I am getting this ReferenceError: document is not defined error when starting the react app via express server.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I am guessing here, but if you are using a charting library which relies on functionality only present on the client, for instance window, you could do a simple check if the component has actually mounted. There are many ways of doing this. If you are writing a functional component, you could for instance do:

const [isClient, setIsClient] = useState(false);

useEffect(() => {
  setIsClient(true);
}, [])

return isClient ? (<SomeFusionChart/>) : (<SomePlaceHolder/>

within the functional component, or separate this into a custom hook.

You could also do

(typeof window !== 'undefined') ? (<SomeFusionChart/>) : (<SomePlaceHolder/>
about 4 years ago · Juan Pablo Isaza 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