Beyond Data Fetching with RSCs

March 13th, 2024//Ep. 182

Sam talks to Ryan about refactoring an MDX blog post to a React Server Component. They discuss how RSC’s ability to render server-side content with “client-side holes” turns out to replace MDX for many uses cases. They also talk about other tools that are (surprisingly) a conceptual subset of the RSC architecture, such as custom Webpack loaders.

Timestamps

  • Intro
  • The Next.js happy path for MDX: Local files
  • Exploring remote MDX content with mdx-remote
  • Separating the serializable parts of MDX from the runtime imports
  • Realizing that RSC covers the same problem space, and ditching MDX
  • Exploring other APIs and plugin ecosystems that RSC could replace: Webpack loaders, next/image, and Liquid templates
  • React’s vision for RSCs
  • How RSCs could replace build-time plugin APIs
  • Replacing MDX with Markdoc, Shiki, and custom node code during render