DEV Community

Discussion on: Gatsby vs Next.JS - What, Why and When?

Collapse
 
dechowmedia profile image
Lucas Dechow

Hi @stackoverprof

Are you meaning that [somewhat].js is not working?
You have to precalculate the routes (or rather the possible outcomes of the route) for it to be exporting the specific pages - this is particularly done if the fallback is set to false:
nextjs.org/docs/basic-features/dat...

It will return a 404 (naturally) unless you specify the pages for export:
nextjs.org/docs/basic-features/dat...

If however you want to have some paths statically generated and then dynamically generate the rest (think a large ecommerce site, or blog/dynamic pages on a otherwise statically generated site) - you can use the fallback: true (as it will fallback to data fetching)
See this for more info:
nextjs.org/docs/basic-features/dat...

Thread Thread
 
stackoverprof profile image
R.Bintang Bagus Putra Angkasa

Thankyou