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

276
Vistas
send getstaticprops data to other static pages, NextJS

im fetching a huge json data from an external API inside my getstaticprops. this data will then be divided into parts to be send to other static pages (hundreds of pages) as props.

// page1.tsx

const page1 = ({ page1Data }) => {
    ...
}

const getStaticProps: GetStaticProps = async () => {
    const res = await fetch('https://hugedata')
    const jsonData = await res.json()
    const { page1Data, page2Data, page300Data, ...allData } = jsonData

    return { props: { page1Data } }
}

i only know how to send the staticprops data to the component inside the file like this.

is there a way send these data to other static pages/routes ? (e.g. to page2.tsx)

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

0

It's not really possible to send data between pages. But you can see the methods described here.

I suggest you really check router and inspect data inside it, you can find a lot of info about data on the page.

P.S. As I see, you are trying to get a lot of data and you need to use pagination and split it to the parts, you can use this lib

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