Server-Side Rendering (SSR)

This page demonstrates Server-Side Rendering (SSR), where the HTML is generated fresh on every request. Unlike Static Site Generation, which produces a fixed HTML file at build time, SSR allows the page to always show the most up‑to‑date data. This makes it ideal for dashboards, analytics, live counters, or anything that changes frequently and must be accurate at the moment of the request.

Expected Behaviour

Each time you refresh this page, Next.js performs a new server-side fetch to the GitHub API. The star count displayed below should update over time as the Next.js repository gains (or loses) stars. Because the page is rendered on the server for every request, the user always sees the latest data.

How This Page Works

  • The browser requests the page from the server.
  • Next.js runs the component on the server before sending HTML.
  • The GitHub API is queried during the request.
  • The server injects the live data into the rendered HTML.
  • The user receives a fully rendered page with fresh data.

Next.js GitHub Stars: 139929