Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What RSCs can do in Next.js today

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Aurora Scharff Aurora Scharff
June 12, 2026
1

What RSCs can do in Next.js today

Avatar for Aurora Scharff

Aurora Scharff

June 12, 2026

More Decks by Aurora Scharff

Transcript

  1. What RSCs can do in Next.js today Aurora Scharff /

    @aurorascharff ▲ DX Engineer, Next.js team REACT SUMMIT AMSTERDAM
  2. Why we love React • Composable function HomePage() { return

    ( < <h1>Welcome back</h1> <QuickPlayGrid /> <MostPlayed /> <PlaylistBrowse /> <TopGenresGrid /> < ); }
  3. Why we love React function DiscoverPage() { return ( <

    <h1>Discover</h1> <TopGenresGrid /> <RecommendedTracks /> <PlaylistBrowse /> < ); } • Composable • Self-contained
  4. Why we love React function LibraryPage() { return ( <

    <h1>Your Library</h1> <LibraryGrid /> <PlaylistBrowse /> <TopGenresGrid /> < ); } • Composable • Self-contained • Clear boundaries
  5. useState + useEffect function TopGenresGrid() { const [genres, setGenres] =

    useState(); const [loading, setLoading] = useState(true); const [error, setError] = useState(); useEffect(() => { fetch('/api/genres') .then(r => r.json()) .then(setGenres) .catch(setError) .finally(() => setLoading(false)); }, []); } • Sharing data means lifting state up • The browser waits for the JavaScript before anything starts
  6. Client data libraries • Data lives in cache keys, not

    the component tree • Fetches still wait on the client const { data } = useQuery({ queryKey: ['genres'], queryFn: getTopGenres, }); // Elsewhere, after a mutation: queryClient.invalidateQueries({ queryKey: ['genres'], });
  7. Route loaders Next.js Pages Router React Router Tanstack Router export

    async function getServerSideProps() { const genres = await getTopGenres(); return { props: { genres }, }; } function Page({ genres }) { return ( <TopGenresGrid genres={genres} /> ); } export const Route = createFileRoute('/library')({ loader: () = getTopGenres(), }); function Page() { const genres = Route.useLoaderData(); return ( <TopGenresGrid genres={genres} /> ); } export async function loader() { const genres = await getTopGenres(); return { genres }; } export default function Page({ loaderData, }) { return ( <TopGenresGrid genres={loaderData.genres} /> ); }
  8. React Server Components • Components own their data again •

    Fetched on the server, next to where it lives export async function TopGenresGrid() { const genres = await db.genre.findMany({ orderBy: { plays: 'desc' }, take: 8, }); return <Grid>{/* … */}</Grid>; }
  9. Declarative loading with Suspense Wrap a Suspense boundary to stream

    UI as it becomes ready. export default function LibraryPage() { return ( <PageHeader title="Your Library"> <ErrorBoundary fallback={<ErrorState />} > <Suspense fallback={<Skeleton />} > <TopGenresGrid /> <RecentlyPlayed /> </Suspense> </ErrorBoundary> </PageHeader>
  10. Self-contained components Instant navigations Coordinated UI Fast first paint Fresh

    data Strong Core Web Vitals RSCs in Next.js got us most of the way there
  11. Time to content visible Client-side fetching (useEffect) App Router (RSCs

    + Suspense) Next.js Pages Router (loaders) 5.1s 1.28s 2.15s Source: Nadia Makarevich developerway.com/posts/react-server- components-performance Slow 4G, 6× CPU throttle
  12. Self-contained components Instant navigations Coordinated UI Fast first paint Fresh

    data Strong Core Web Vitals What we were still missing
  13. Self-contained components Instant navigations Coordinated UI Fast first paint Fresh

    data Strong Core Web Vitals What we’re shipping now
  14. Next.js 16.3: Instant Navigations • App Shells • Partial Prefetching

    • Instant Insights • Navigation Inspector • Playwright utility RUNTIME DEVTOOLS
  15. Foundation Official Next.js Skills Agent-ready errors Built for the agents

    you're already using Version-matched docs. Dev MCP server. Real browser verification. Source, cause, and fix options surfaced for agents. Guided workflows for verification and shell optimization.