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

226
Vistas
Is it possible to pass details stored in localStorage or Cookies to getStaticPaths and getStaticProps in nextjs

Is it possible to pass information stored from localStorage or Cookies to getStaticPaths and getStaticProps in next, the API that holds the data of the content I need, needs me to pass in the current logged-in user's id to be able to fetch the data I want

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

0

getStatisPaths and getStaticProps is run at build time. You cant use cookies. You can use getServerSideProps.

Provided req middleware in getServerSideProps -

The req in the context passed to getServerSideProps provides built in middleware that parses the incoming request (req). That middleware is:

`req.cookies` - An object containing the cookies sent by the request. Defaults to `{}`
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