Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda