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

140
Vistas
nextJS catch all routes with statically generated pages doesn't work

Repo here: https://github.com/Chenzo/nextjs-fallback
Example page here: https://chenzo.github.io/nextjs-fallback

I've got a nextJS project set up like this:

/pages  
   /things   
      [thing].js    
      [[...anything]].js 

2 pages are generated from some simple data using the [thing].js template

https://chenzo.github.io/nextjs-fallback/things/onething
https://chenzo.github.io/nextjs-fallback/things/thingtwo

there's a link to a third non-existent page /things/thirdthing that goes to the 404 page. But there's a FOURTH think that goes to /things/thirdthing/what that goes to the [[...anything]].js page.

I understand that the initial call has to land on a page that has the nextjs/react app running but from the homepage, the third link should go to the anything catch-all, yes? why is it only catching the fourth link?

we've got a bunch of "things" prerendered, but then there's the possibility of thousands of "things" that can be linked, and we can just ajax for them, but I'm perhaps going about this wrong?

I want, if staticly generated, use [thing].js if not then use [[...anything]].js

thank you for your time.

about 4 years ago · Juan Pablo Isaza
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