3 ms·
A big benefit of the pages folder is the ability to statically generate content on build time and deploy, then getting the performance benefit of being a static
by kylehotchkiss 4y ago
A big benefit of the pages folder is the ability to statically generate content on build time and deploy, then getting the performance benefit of being a static site. Does/will the app folder allow for the same static generation capability? Seeing `Is the pages directory going away?` in the release notes to me seems like a hint that the pages directory may be going away.
- MalseMattie 4y agoYes, the app router allows for the same static generation.[0] It is the default rendering strategy, and the page only becomes "dynamic" (rendered at request time) if the page has a "dynamic function". (functions that use URL search params etc.) [0] https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic-rendering https://nextjs.org/docs/app/building-your-application/render...
- leerob 4y agoFurther, you can statically export your application to HTML, CSS, and JS files and host without a server: https://nextjs.org/docs/app/building-your-application/deploying/static-exports https://nextjs.org/docs/app/building-your-application/deploy...
- kylehotchkiss 4y agoThis is one of my favorite ways to build Next.js sites, and adding in Dynamic when needed is Next's superpower. Thanks for noting the the new app/ folder supports it!