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

107
Views
How to prevent reloading of iframe in reactjs?

There is an api from which I get html document contents, currently I am taking data in chunks and setting to state and there is iframe whose "srcDoc" attribute is taking that value from state. What I want to do is prevent reloading of iframe because each time "srcDoc" is set iframe scroll is taken to top and it reloads. Here's code :

 const stream = new Promise(() => {
      axios({
        url: `http://54.90.50.223/api/mainapi/Documents/GetHTML`,
        method: "GET",
        onDownloadProgress: (progressEvent) => {
          const dataChunk = progressEvent.currentTarget.response;
          console.log(dataChunk);
          str += dataChunk;
          this.setState({ srcDoc: str });
        },
      }).then(({ data }) => Promise.resolve(data));
    });

about 4 years ago · Juan Pablo Isaza
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!