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

94
Views
Listen to top url from React app inside iframe

I have two react apps. The parent app loads the child app using an iframe.

I can access the top URL using window.top.location (since both apps have the same origin).

The problem is that. when the location changes, I need to update the state in my child app:

const topLocation = window.top.location;

useEffect(() => {
 // Do something
}, [topLocation]);

The problem is that the URL change doesn't trigger a re-render, so the topLocation value never changes.

Any ideas?

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!