๐Ÿ”„ ISR, the thing behind What's Happening

Quick one! The What's Happening pages pull from over 300 YouTube channels, podcasts, newsletters and feeds, and fetching all of that every time someone opened the page would take ages and get me rate limited by YouTube pretty quickly. Incremental Static Regeneration (ISR) is what makes it work.

What is it?

Definition

ISR is a Next.js feature that builds a page once as static HTML, then quietly rebuilds it in the background after a set amount of time, so visitors always get a ready-made page without waiting on a server.

  • You add a revalidate time (in seconds) to getStaticProps and that's pretty much it
  • The first visit after that time still gets the current page straight away, and that visit kicks off a rebuild behind the scenes
  • If the rebuild fails, the last good page stays up, so a broken feed never means a broken page

This is all it takes on the What's Happening page:

const ONE_DAY = 60 * 60 * 24;

// give the rebuild up to a minute, the default 10 seconds wasn't enough
export const config = { maxDuration: 60 };

export const getStaticProps = async () => ({
  props: await getWhatsHappening(),
  revalidate: ONE_DAY,
});

Why it's so handy

  • Every visit is a static page from Vercel's edge, so it loads as fast as any of my articles ๐Ÿš€
  • The feeds get fetched once a day rather than once per visitor, which keeps me well inside the YouTube API's free quota
  • No server, cron job or database to look after, the rebuild is just Next.js running getStaticProps again
  • The content is in the HTML, so Google can read the whole page rather than a loading spinner

One thing that caught me out: the rebuilds were quietly dying at Vercel's default 10 second limit, since fetching a few hundred feeds takes longer than that, so the page just sat there showing an old week. Exporting config = { maxDuration: 60 } from the page gave it room to finish.

What else has changed

  • YouTube now comes straight from the YouTube Data API instead of channel RSS and scraping watch pages, with RSS kept as a fallback and a guard that keeps the last good page if most channels fail
  • More feeds, 322 sources in total now, with new Design and Security topics on the tech side
  • Shorts are ranked against other Shorts, so they don't drown out the videos
  • The new week starts on a Wednesday, since a Monday morning issue was always empty
  • A whole gaming page with release radar, Steam charts, creator strips and genre tags, plus some Halloween picks at the top through October ๐ŸŽƒ

Have a look at What's Happening if you haven't already, and if there's a channel or feed you think is missing, let me know!

Peace! โœŒ๏ธ

Thanks for reading! Time for one more?

<LiveProvider code={code}>
<LiveEditor />
<LivePreview />
</LiveProvider>

๐Ÿงช Bye CodeSandbox, hello react-live

04 Oct 2026 โ€ข ๐Ÿ“– 2 min read
โฑ๏ธ 120 second update

Swapped the broken CodeSandbox embeds for react-live, so the code demos now run right here on the site.

0
0
0
REACT TYPESCRIPT
// Sketchy's journal, the whole DB
// boils down to four tables and a
// single sync expo-sqlite handle.
const db = SQLite.openDatabaseSync(
'journal.db'
)

๐Ÿ›น Sketchy - Skateboard Companion App

03 May 2026 โ€ข ๐Ÿ“– 30 min readโœ๏ธ Updated 04 Oct 2026
๐Ÿ”ฅ Popular read

Behind the scenes of Sketchy, a skate companion app built on Expo SDK 55, React Native 0.83, expo-sqlite, OpenStreetMap and EAS, with the New Architecture and React Compiler turned on.

0
0
0
REACT NATIVE TYPESCRIPT