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

171
Views
How to use window.open with state data (React)

I'm trying to replace history.push to window.open (to of course open in a new tab). I tried to use query params to access my state's data to be fetched in the new tab.

window.open(`/${db}/endpoint?var1=${link.var1}&var2=${link.var2}`)

Anyone has a tip for this problem? Thank you!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you use window.open then the script will be loaded from scratch in a new tab (will not be connected to the previous tab in anyway), so either you have to load data from local storage if you want to share some data between sessions or tabs.

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!