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

187
Views
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 answers
Answer question

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