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

293
Views
How to refresh another page in react JS

So here:

I want to refresh page A but the refresh will trigger on page B. Is is any other way where it's not from the localstorage?

Because I'm working on an e-commerce website. And I want page A to refresh when a button on page B is clicked. So that the content of page A will be updated just like in page B.

To understand more:

page A is the order details screen for the customer or client page B is the order details screen for the partner or seller

So the idea is, when the partner/seller updated the order status (on the way, in the kitchen, complete) from page B, the page A will refresh so that the customer or client will see their updated order status.

I hope that makes sense. A help is really much appreciated. Thank you so much!

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

0

The scenario is pretty much like having an admin page and a client page. When updating status of a product's status from the admin page, we want to also update that of in the Client page.

I think you can use firebase/firestore: In the admin page you can update the document of a collection, for example product

const productRef = db.collection('product').doc('id_1');

const res = await productRef.set({
  status: "active"
}, { merge: true });

In the client site, we can listen change on that collection's document For example:

firestore().collection('product').onSnapshot(querySnapshot => {
// handle changes to documents in the collection here
})

By doing that it solves a bigger problem where user can be any browser or devices...

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!