This app demonstrates the new *On-Demand ISR support* in Next.js 12.1 (view source).

How does this work?

When issues on the `on-demand-isr` repo change (get created, commented on, deleted, etc), GitHub fires off a webhook and the impacted pages get re-rendered and pushed to the edge, on demand. The webhook on the Next.js app side executes a new `res.revalidate()` API call.

Didn't this exist already?

Unlike `revalidate` with a time interval, a Serverless Function is invoked _only when content changes_, making it faster for the user (they see changes immediately), and more cost-efficient for owners.

_💡 Try creating a new issue or commenting, and refresh this page to see the regenerated one!_
Pages take about *300ms~* to fully propagate to the global Vercel Edge Network after the regeneration completes.

test23
#21 opened 3 years ago by ctgowrie
test22
#20 opened 3 years ago by ctgowrie
test21
#19 opened 3 years ago by ctgowrie
test17
#16 opened 3 years ago by ctgowrie
test16
#15 opened 3 years ago by ctgowrie
test15
#14 opened 3 years ago by ctgowrie
test11
#13 opened 3 years ago by ctgowrie
test10
#12 opened 3 years ago by ctgowrie
test9
#11 opened 3 years ago by ctgowrie
test8
#9 opened 3 years ago by ctgowrie
test8
#8 opened 3 years ago by ctgowrie
test7
#7 opened 3 years ago by ctgowrie
test6
#6 opened 3 years ago by ctgowrie
again
#5 opened 3 years ago by ctgowrie
test3
#4 opened 3 years ago by ctgowrie
test2
#3 opened 3 years ago by ctgowrie
anotha one
#2 opened 3 years ago by ctgowrie
test
#1 opened 3 years ago by ctgowrie