A Guide to React Compiler Rendering

This ad is not shown to multipass and full ticket holders
React Advanced
React Advanced 2026
October 23 - 26, 2026
London, UK & Online
Upcoming event
React Advanced 2026
React Advanced 2026
October 23 - 26, 2026. London, UK & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

React is a library for "rendering" UI from components, but many users find themselves confused about how React rendering actually works.  The new React Compiler promises to "automatically optimize your React app"... but what is it actually _doing_ to your component?  How does that complex compiler-written code actually make your app faster?  How does the Compiler change the long-standing fundamental model of React's rendering behavior?

In this talk, we'll clear up the confusion and provide a solid foundation for understanding when, why, and how React renders.  We'll look at React's built-in techniques for optimizing rendering performance, including the little-known trick that the Compiler depends on.  We'll demystify the Compiler's output and break down exactly what that code does.  Finally, we'll see how the Compiler rewrites our mindset of using React itself, and what that means for learning and using React in the future.

You'll leave with an accurate mental model of React's behavior before and after the Compiler, and be ready to use React more effectively.

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

Mark Erikson
Mark Erikson
32 min
12 Jun, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Marc Erickson discusses React rendering fundamentals, optimizing performance, and compiler efficiency. The React compiler optimizes components with memoization and efficiently recalculates changes. React 19 introduces memo cache hook for performance optimization. Enhancements in logic execution, reference optimization, and context changes improve rendering performance. The React compiler impacts re-renders based on props, inputs, and tool transitions. Developing a time-traveling debugger at Replay addresses bug investigation challenges. Understanding code optimization and React build tool transitions are crucial for performance investigation in software engineering.

1. Understanding React Rendering Fundamentals

Short description:

Marc Erickson, senior time-travel engineer at Replay, discusses React compiler rendering, emphasizing the importance of understanding React fundamentals and the goals for the session. Rendering in React involves components, JSX syntax, create element calls, virtual DOM, and React's default behavior in updating components.

All right. Good morning, Amsterdam. My name is Marc Erickson, and I'm very excited to share with you a guide to React compiler rendering. A couple of quick things about myself. I'm a senior time-travel engineer at Replay where we built a time-travel debugger for both humans and agents. I will answer questions anywhere there is a text box on the internet. I help moderate the React communities. I collect interesting links and talk about them in places like the This Month in React podcast. I write extremely long blog posts. I recently wrote an article about my own emotional experience using AI as well as my workflow, and I am a Redux maintainer. It is almost exactly ten years that I've been working on Redux. But also most people know me as that guy with the Simpsons avatar, which is actually now slightly out of date. I had LASIK back in January.

Why are we talking about React rendering today? I am a firm believer that it is important to know fundamentals of the tools we are using, and that's even more true in an age of AI. Even today, I see a lot of people with misconceptions about how React actually works. When we talk about the React compiler, it flips some of that default behaviour upside down. You need to make sure you understand the fundamentals first. And this is really science, not magic. So the goals for today, we will spend some time reviewing some fundamentals of React behaviour, we are going to look at the options we have available for optimising React performance, we will look at what the compiler does and what the output looks like, and then we will finish by talking about how it changes our mental model of how to use React. The slides are up on my blog, blog.isquaredsoftware.com, and I will have the link there again at the end.

Back to the beginning. What is rendering? Rendering is the process of React asking your components, what do you want the UI to look like at this point in time? Normally, the render output is based on the current props and the state for that component. When we write components, we write this angle bracket JSX syntax that we have seen and all know and love, and when we write the JSX syntax in our code, at build time, that gets converted into create element calls, and then at runtime, your component executes, it calls create element, and it returns these element objects that have the component and its props and the children. If you've ever heard the term virtual DOM, that's really just describing these element objects. So during a render, React loops over all your components, it collects all the element objects in a tree, and then it diffs the old and the new element trees to figure out, are you asking for anything different in the UI this time? Now, a very, very important point, if there's anything you remember, please remember this slide right here. React's default behaviour is that when you render in one component, you call set state, React will keep recursing down through all the children below that. So if I call set state in the app component up there, it is going to continue through all four of the children below that. If I call set state in the inspiration component, it will also render the two children below that. It keeps going down through all the children below. Now, when we render, this does not always mean that there's an update to the DOM.

2. Optimizing React Rendering Performance

Short description:

React discusses rendering, avoiding wasted efforts, rules for rendering, optimizing performance with memo function and element reference trick, and common misconceptions about React re-rendering components.

React originally talked about rendering is like redrawing your whole page, but in reality, it's were there any differences? Are there any requested changes to the UI? So it's possible to render a component, have it request I want the same output as last time, and if you think about it, then that's kind of wasted effort. We went through the process of running the component and outputting the elements and nothing actually needed to change, and so we can kind of think of those as wasted renders, and usually that's if there's the same props in the same state, then we're asking for the same children as last time. But overall, rendering is not a bad thing. It's how React knows if there's anything that we need to update.

Now, React does have a number of rules that you're supposed to follow. We're not supposed to mutate existing values like props and state, you should not be generating random values while rendering, and especially don't ever use those as keys. It is okay to mutate values you created during the rendering process. A console log is technically a side effect, but that's okay, that doesn't break anything. There are times you can lazily initialise a ref object. You shouldn't be triggering requests while rendering, unless you're doing suspense, and in theory you can call set state while rendering but only if it's conditional. There are some things you have to keep in mind while rendering.

So how do we actually optimise performance? React gives us some tools to do that, and the main way you optimise is by saying if the props for this component have not changed, don't render it. And if we skip this component, that means we also skip all the children inside of it. So the main tool React gives us is the memo function. If you've ever heard the term higher order component, it just means it's a wrapper around the actual component that you have. So memo is a higher-order component that automatically looks at all the incoming props, and if none of the props have changed, it skips this component. Now there is one other very little-known trick that is built into React that has been around really since the beginning, but nobody knows this exists. If you're rendering a component, and, as part of the output, you include the exact same element object reference that you had the last time, React will get to that part, and it will say this is the same element. I'm just going to skip this. There's a couple of ways you can do this. One is by doing a use memo to memoise the creation of some of the elements, or if you've ever used the children prop and included that in the output, that's the same element as last time. The way that I like to think about this is React.memo is the child component itself saying, I want to be optimised. Only re-render me if my props change. I like to think about the element reference trick as the parent component saying if the inputs to this one haven't changed, don't render it. Now on that note, this is one of the most common misconceptions that I've still seen over the years. People have really from the beginning assumed React only re-renders my components when their props change. No, no, that's not the case. I said earlier, when React renders, it just keeps going top to bottom from where you did a set state. The only time props references matter is if you are trying to optimise it. If you have a React.memo, then the props matter.

QnA

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
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.