Always Accurate Documentation

This ad is not shown to multipass and full ticket holders
JS Nation
JSNation 2026
June 11 - 15, 2026
Amsterdam & Online
The main JavaScript conference of the year
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation 2026
JSNation 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content

By treating documentation as React building blocks, we can generate a one‑page README, an interactive API reference, or a fully branded design‑system site from the same source of truth.

The result is always‑accurate API documentation, MDX pages, and interactive examples that stay updated every time you push code, no more stale documentation or forgotten types. I’ll show how React Server Components fits perfectly into making it easy to have accurate, up-to-date documentation as extensible as any UI.

This talk has been presented at React Advanced 2025, check out the latest edition of this React Conference.

FAQ

Documentation drift happens due to the lack of a single authoritative source, fragmented information across multiple platforms, and separate updates to code and documentation.

React server components offer server-side execution, streaming, composition, and lazy evaluation, which improve documentation accuracy, performance, and maintainability.

The 'Code Block' component renders code examples directly from source files, ensuring they are validated against the project's configuration and formatted correctly.

The 'Reference' component consults the TypeScript compiler to provide accurate API references, ensuring that documentation reflects the current state of the code.

Making documentation a living part of a project ensures it stays accurate, empowering teams to work efficiently and confidently while providing a better user experience.

Accurate documentation helps teams move faster, reduces errors, and allows for confident shipping of features, enhancing overall productivity.

Traditional documentation generators often struggle with customization, integration, and maintaining sync with code changes, leading to performance bottlenecks.

React server components allow marketing materials to display live, accurate code snippets directly from the source, ensuring that promotional content reflects the actual product state.

Documentation drift occurs when documentation becomes outdated or inconsistent with the current state of the codebase, leading to errors and inefficiencies.

React server components help prevent documentation drift by rendering documentation directly from the codebase, ensuring accuracy and alignment with the latest code changes.

Travis Arnold
Travis Arnold
11 min
01 Dec, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
As a designer and engineer, I've faced challenges with outdated documentation causing friction and trust erosion. Documentation drift arises from scattered sources and lack of a single reference, leading to ambiguity and staleness. React server components offer benefits like server-side rendering, composition flexibility, and lazy evaluation for enhancing documentation quality. By directly generating documentation from the TypeScript compiler, React server components ensure accurate and up-to-date content, improving documentation accuracy and flexibility.
Available in Español: Documentación Siempre Precisa

1. Challenges of Documentation Drift

Short description:

As a designer and engineer, I've faced outdated documentation issues, causing friction and trust erosion. I'll discuss why documentation drifts, using React server components, and accurate documentation practices. Issues with traditional documentation generators include limitations in customization and integration work. Documentation drift often results from scattered information sources and lack of a single reference.

Over the years as a designer and engineer, I've written documentation for many different projects, sometimes in a rush and sometimes with a team over many months. One constant across every surface is that it doesn't take long before you or your teammates start finding outdated explanations and code examples. I'm Travis Arnold, and throughout my career, I've seen how outdated documentation can cause friction and work flows and erode trust in projects. It's a challenge that engineering teams of all sizes face, and in this talk I'll explain why documentation drifts, how to catch it early, and how React server components can help keep your documentation accurate as code changes.

We'll cover three main topics. Why documentation drifts, using React server components to keep documentation in sync, and finally how to write accurate documentation everywhere. Let's start with something we all know too well. A code example. We've all copied code snippets that are provided as a source of truth only to hit TypeScript errors later when pasting them into our code base. Imagine a developer is excited to implement a feature, but they're halted by unexpected errors in outdated documentation. This is documentation drift, and it wastes hours of time.

It's happening for a few reasons. First is that while traditional documentation generators work well for simple docs, they have several limitations. They produce a fully baked HTML site that is hard to customize. They expose JSON that requires extra integration work. They often require their own build process. And they cannot granularly update generated types which creates performance bottlenecks. And if you want to customize or overwrite the output or connect it to your design system, you end up creating workarounds and orchestrating multiple tools that all have to be kept in sync. One of the most common reasons documentation drifts is the lack of a single authoritative source for what's actually true. Instead, information is scattered all over the place. Source code lives in a repository, API specs are in a separate documentation site, and usage examples are pasted into marketing materials. Each of these sources evolves independently and often out of sync.

2. Importance of Documentation Alignment

Short description:

This fragmentation leads to ambiguity in documentation references and spread across various sources. Stale docs result from scattered information sources and lack of a single reference. Tying docs to the source code prevents ambiguity and ensures accuracy. Lack of connection to a single source and spreading across multiple locations contribute to documentation drift.

This fragmentation means there's no guarantee which artifact is the real reference. As teams update code, documentation and specifications in parallel, contradictions will inevitably appear. To solve this, documentation needs to be tightly coupled to the source code itself. When docs are generated and validated against the actual code base, you eliminate any ambiguity. Docs drift not only because they're not connected to a single source of truth, but also because they're spread across a large number of places.

Docs exist across read me's, sites, blogs, slides, and marketing materials. There's different teams maintaining those services which can cause drift. And copying and pasting propagates and last minute changes will often get missed. A code snippet might begin in a developer's IDE, get copied into the read me, and later appear as a screenshot in marketing. When the code changes, these copies often stay outdated. It's similar to a game of telephone where truth can easily break down.

Docs will go stale if they're not tied to a source of truth. For example, at a startup I worked at, we didn't have a dedicated documentation team, and engineers and designers helped out when they could. But because of this, our documentation tools had to fit right into our normal workflow or they just simply wouldn't get used. Building these systems yourself is rarely practical. You need deep knowledge of abstract syntax trees, otherwise known as ASTs, which represent your code's structure, plus tooling to traverse and transform them. For languages like TypeScript, you also need to understand the TypeScript compiler API and the type checker.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Case Study: Building Accessible Reusable React Components at GitHub
React Summit 2024React Summit 2024
29 min
Case Study: Building Accessible Reusable React Components at GitHub
Watch video: Case Study: Building Accessible Reusable React Components at GitHub
The talk discusses building accessible React components and emphasizes the importance of using the correct HTML elements and ARIA roles for accessibility. It explains how to navigate and select options within a form and how to add supplementary text using Aria described by. The speaker also discusses the benefits of using conditional checkboxes and ARIA disabled to improve the UI. Additionally, the talk explores the role of JavaScript in web accessibility and provides recommendations for testing website accessibility.
React Server Components in AI Applications
React Advanced 2024React Advanced 2024
17 min
React Server Components in AI Applications
Today we will discuss React server components with AI and how to build a better search experience using them. We will learn how to make a Next.js app AI-enabled using the Vercel AI SDK. The Vercel AI SDK's streamUI function with the GPT 4.0 model will be used to make suggestions interactive. We will explore the use of history and conversation in AI and how to continue the conversation and read the result. The concept of generative UI with the vector database will be introduced, along with querying the database for movies. We will process user queries and return movies based on them. The power of React server components in enhancing UI will be demonstrated. In summary, the Talk covers vector embeddings, natural language search, and generative UI.
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
React Summit 2022React Summit 2022
17 min
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
Top Content
Today's Talk discusses building flexible, resilient, and future-proof React components using composition and configuration approaches. The composition approach allows for flexibility without excessive conditional logic by using multiple components and passing props. The context API can be used for variant styling, allowing for appropriate styling and class specification. Adding variants and icons is made easy by consuming the variant context. The composition and configuration approaches can be combined for the best of both worlds.
The Worlds Most Expensive React Component and How to Stop Writing It
React Advanced 2021React Advanced 2021
23 min
The Worlds Most Expensive React Component and How to Stop Writing It
Top Content
Today's Talk discusses expensive React components and API design, with a focus on the cost of coordination and overcoming imposter syndrome. The speaker shares a story about a cat trying to fix salted coffee, highlighting the importance of finding simple solutions. The billion dollar component on ReactJS.org is examined as an example of an expensive component. Techniques for customizing messages, improving accessibility, and using polymorphic props are discussed. The Talk concludes by emphasizing the cost of communication and the need to evaluate if props and components are the right tools for the job.
Find Out If Your Design System Is Better Than Nothing
React Summit 2022React Summit 2022
20 min
Find Out If Your Design System Is Better Than Nothing
Building a design system without adoption is a waste of time. Grafana UI's adoption is growing consistently over time. The factors affecting design system adoption include the source mix changing, displacement of Homebrew components by Grafana UI, and the limitations of Grafana UI's current state. Measuring adoption is important to determine the success of a design system. The analysis of code through static code analysis tools is valuable in detecting and tracking component usage.
How to achieve layout composition in React
React Summit 2022React Summit 2022
8 min
How to achieve layout composition in React
This talk discusses achieving layout composition in React using Bedrock Layout Primitives. By componentizing CSS layout, complex layouts can be achieved and reused across different components. The talk also covers the challenges of achieving complex layouts, such as card lineups, and provides solutions for maintaining alignment and responsiveness. The BedrockLayout primitive library simplifies web layouts and offers flexibility in composing layouts.

Workshops on related topic

Hands-on with AG Grid's React Data Grid
React Summit 2022React Summit 2022
147 min
Hands-on with AG Grid's React Data Grid
Top Content
Workshop
Sean Landsman
Sean Landsman
Get started with AG Grid React Data Grid with a hands-on tutorial from the core team that will take you through the steps of creating your first grid, including how to configure the grid with simple properties and custom components. AG Grid community edition is completely free to use in commercial applications, so you'll learn a powerful tool that you can immediately add to your projects. You'll also discover how to load data into the grid and different ways to add custom rendering to the grid. By the end of the workshop, you will have created an AG Grid React Data Grid and customized with functional React components.- Getting started and installing AG Grid- Configuring sorting, filtering, pagination- Loading data into the grid- The grid API- Using hooks and functional components with AG Grid- Capabilities of the free community edition of AG Grid- Customizing the grid with React Components
Practice TypeScript Techniques Building React Server Components App
TypeScript Congress 2023TypeScript Congress 2023
131 min
Practice TypeScript Techniques Building React Server Components App
Workshop
Maurice de Beijer
Maurice de Beijer
In this hands-on workshop, Maurice will personally guide you through a series of exercises designed to empower you with a deep understanding of React Server Components and the power of TypeScript. Discover how to optimize your applications, improve performance, and unlock new possibilities.
 
During the workshop, you will:
- Maximize code maintainability and scalability with advanced TypeScript practices
- Unleash the performance benefits of React Server Components, surpassing traditional approaches
- Turbocharge your TypeScript with the power of Mapped Types
- Make your TypeScript types more secure with Opaque Types
- Explore the power of Template Literal Types when using Mapped Types
 
Maurice will virtually be by your side, offering comprehensive guidance and answering your questions as you navigate each exercise. By the end of the workshop, you'll have mastered React Server Components, armed with a newfound arsenal of TypeScript knowledge to supercharge your React applications.
 
Don't miss this opportunity to elevate your React expertise to new heights. Join our workshop and unlock the potential of React Server Components with TypeScript. Your apps will thank you.
From Idea to Production: React Development with a Visual Twist
React Summit 2023React Summit 2023
31 min
From Idea to Production: React Development with a Visual Twist
WorkshopFree
Omer Kenet
Omer Kenet
Join us for a 3-hour workshop that dives into the world of creative React development using Codux. Participants will explore how a visually-driven approach can unlock creativity, streamline workflows, and enhance their development velocity. Dive into the features that make Codux a game-changer for React developers. The session will include hands-on exercises that demonstrate the power of real-time rendering, visual code manipulation, and component isolation all in your source code.
Table of the contents: - Download & Setup: Getting Codux Ready for the Workshop- Project Picker: Cloning and Installing a Demo Project- Introduction to Codux Core Concepts and Its UI- Exercise 1: Finding our Feet- Break- Exercise 2: Making Changes While Staying Effective- Exercise 3: Reusability and Edge Case Validation- Summary, Wrap-Up, and Q&A
Crash Course into TypeScript for content from headless CMS
React Summit 2022React Summit 2022
98 min
Crash Course into TypeScript for content from headless CMS
Workshop
Ondrej Polesny
Ondrej Polesny
In this workshop, I’ll first show you how to create a new project in a headless CMS, fill it with data, and use the content in your project. Then, we’ll spend the rest of time in code, we will:- Generate strongly typed models and structure for the fetched content.- Use the content in components- Resolve content from rich text fields into React components- Touch on deployment pipelines and possibilities for discovering content-related issues before hitting production
You will learn:- How to work with content from headless CMS- How content model can be leveraged to generate TS types and what benefits it brings to your project- How not to use string literals for content in code anymore- How to do rich text resolution into React components- How to minimize or avoid content-related issues before hitting production
Write Once, Use Everywhere: React Meets Web Components
React Summit US 2025React Summit US 2025
78 min
Write Once, Use Everywhere: React Meets Web Components
Workshop
Hadar Geva
Hadar Geva
This hands-on workshop explores how to transform React components into standards-based Web Components, unlocking the ability to share UI elements across Angular, Vue, Svelte, and even vanilla JavaScript applications. While frameworks like Angular and Vue offer native support for this kind of interoperability, React doesn't—at least, not out of the box.We’ll demystify how to achieve similar results in React using supported patterns and tooling. Through live coding and guided exercises, you’ll learn how to bridge the gap between React and the Web Components standard to promote true component reusability, reduce duplication, and simplify integration in micro frontends and design systems. Participants will leave with practical techniques, tooling knowledge, and real-world strategies they can immediately apply to their own projects.