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
not losing state when refresh webpage

I made a Simple WebApp in React.js, that can add food to a cart and see it or finally order it. when I add food, my cart updates and can see data but when I refresh the page, data will be gone how can save data and when I refresh the page still can see it.

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

0

You have different solutions to store your data:

  1. LocalStorage with no expiration time
  2. SessionStorage is cleared when the page session ends
  3. Redux is a predictable state container
  4. React Context is designed to share data that can be considered globally for a tree of React components
about 4 years ago · Juan Pablo Isaza Report

0

If you need to save the state of your shopping cart somewhere you can do that server side. You can store it in Session state. When you refresh you refill the page from Session state.

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!