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

179
Vistas
Whats the best way to avoid reloading videos when using the same source in different components or pages?

Is there an option in Javascript, React, or Next JS to optimize loading performance when using the same video resource in different components on different pages on the site (to avoid reloading)? Something like keeping the videos that have been loaded in Memory to not load them again if the layout changes. An example use case could be a full-width list view of multiple videos in one component and a grid overview in another.

const ComponentOne = () => {
  return (
    <div className="container">
      <video className="videoStyle01" autoPlay muted loop>
        // Using the same video src
        <source src="../videos/video_H264.mp4" type="video/mp4" />
      </video>
      <div>Video title</div>
    </div>
  );
};

const ComponentTwo = () => {
  return (
    <div className="container">
      <div>Other Styling Elements and Description</div>
      <video className="videoStyle02" autoPlay muted loop>
        // Using the same video src
        <source src="../videos/video_H264.mp4" type="video/mp4" />
      </video>
    </div>
  );
};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try React Memo,

If your component renders the same result given the same props, you can wrap it in a call to React.memo then it boosts the performance

https://reactjs.org/docs/react-api.html#reactmemo

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