- By default, any component created in the app directory is a Server Component.
- By default, pages will be statically generated at build time.
- Fetching is performed server-side to pre-render the static page.
- Server-side rendering reduces waterfalls and is more secure (secrets, DB connections).
How does it work
- Run `yarn build && yarn start` to generate aproduction build on localhost
- Navigate the Post tabs to see when that specific page has been generated.
- Try to refresh the pages: it page shouldnever re-render after the first cached render.
If your pages are re-rendering each time, you are probably running the server (`yarn dev`) rather than a production build. By default, the dev server will always be dynamic.