How it works: This page is generated on every request. The API call to JSONPlaceholder happens each time someone visits this page. Refresh to see the timestamp update!
Pros: Always fresh data, good SEO, personalized content
Cons: Slower than SSG, server load on each request
@Bret
Sincere@april.biz
Gwenborough
@Antonette
Shanna@melissa.tv
Wisokyburgh
@Samantha
Nathan@yesenia.net
McKenziehaven
@Karianne
Julianne.OConner@kory.org
South Elvis
@Kamren
Lucio_Hettinger@annie.ca
Roscoeview
@Leopoldo_Corkery
Karley_Dach@jasper.info
South Christy
@Elwyn.Skiles
Telly.Hoeger@billy.biz
Howemouth
@Maxime_Nienow
Sherwood@rosamond.me
Aliyaview
@Delphine
Chaim_McDermott@dana.io
Bartholomebury
@Moriah.Stanton
Rey.Padberg@karina.biz
Lebsackbury
export default async function SSRPage() {
// Fetch happens on EVERY REQUEST
const response = await fetch('https://api.example.com/users', {
cache: 'no-store' // This forces SSR
})
const users = await response.json()
return <div>{/* Render users */}</div>
}