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

344
Views
React app - redirect or popup - how to keep current form data

I am new to React web development, and I am curious what is the best way to handle following situation:

To simplify the problem, let's say that there is an Invoice form where user inputs basic invoice data like number, date, payment type, shipping method etc..., and amongst other, user needs to choose an invoice customer. If the customer is not present in database, user needs to input a new customer through separate Customer form component.

Two solutions come to my mind:

First is to open a popup/dialog within the Invoice form, which contains all the customer details, so that user actually never leaves the Invoice form and keeps all user input data, and after the new customer data has been submitted through popup, user can choose that particular customer.

Second solution that comes to mind is to redirect the user to customer form url, but then all of invoice data needs to be put somewhere temporarily, presumably in redux store or local storage, and after the customer has been submitted, user is redirected back to invoice form, and all of initial input data is retrieved from storage and present to user.

It seems to me that both solutions have pros and cons, I am not a very big fan of popups and dialogs, but the second solution seems like a lot of work for something that simple. I've seen both of them implemented on other websites. Is there any third option that I haven't considered, or what do you suggest between these two?

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!