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

117
Vistas
why redux store becomes empty in next js when I navigate from one page to another page?

In my first page I called API through getServerSideProps function, then i got 2 id's as a response, for example id-A and ID-B, Now in my second page I want to call another API through getServerSideProps function, where I have to pass id-A and ID-B as a parameters to API. how to get it?

What I have done is I stored api response in redux state, and I am trying to access redux state in second page to call api but it becomes null

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

0

You should have your redux provider at the app/top level (_app.js) instead of the pages level. Something like this in your _app.js

export default function MyApp({ Component }) {

  return (
    <Provider store={yourStore}>
      <Component />
    </Provider>
  )
}

If you instead have your Provider set up per page, then it means the store is recreated for every new page you visit.

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