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

130
Vistas
Data of redux store getting empty on reload

I am new to react and redux. I have 3 screens in my react js application. On First Screen, user input the id and that id get stored in redux store. On submit of first screen button API is called which take id as a parameter and bring the data. I Store that data in redux store. On Second Screen, I show that data after fetching it from store. Problem arises when I reload the page, the data of redux store get initilized to initial state i.e. empty.

I want when I reload the page, request should again go to server and fetch the data.

NOTE - I dont have access to id on second screen after reload so I cant call API again inside useEffect Hook. Secondly I dont want to store data in any storage.

Kindly assist. Thank You

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Unfortunately, redux or any react state is not maintained throughout a browser refresh without some sort of persistence to either a DB, or browser storage like localStorage or indexedDB.

IF you do decide to persist the redux store to maintain state through browser refreshes... I hear redux-persist is great for it. https://www.npmjs.com/package/redux-persist. It will use local-storage or session storage depending on how it's configured.

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