TanStack Redact: A Smaller Runtime for React Applications
Explore TanStack Redact, an alternative runtime for React applications designed to reduce client-side JavaScript without rewriting your components or hooks. Learn how it works, compare its performance, explore its limitations, and integrate
The React ecosystem continues to evolve. From Server Components and concurrent rendering to modern build tools and performance optimizations, developers have more options than ever when building web applications.
However, one challenge remains particularly important: How can we build React applications that deliver less JavaScript to the browser without sacrificing the developer experience?
This is where TanStack Redact comes in.
Redact is an alternative runtime for React applications that aims to reduce client-side JavaScript while preserving the familiar component model, APIs, and hooks developers already use.
In this article, we'll explore what TanStack Redact is, how it works, how it compares to React, and whether it's worth considering for production applications.
TanStack Redact is an alternative runtime for React applications, designed to provide a smaller and simpler implementation of React's APIs and component model.
It is important to understand that Redact is not a new framework or a replacement for the React ecosystem.
Instead, it provides another runtime option for applications built with React.
Redact supports many familiar React features, including:
Function Components
React Hooks
Context API
Refs
Memoization
Lazy Components
Portals
Error Boundaries
Suspense
Server-Side Rendering and Hydration
One of its main advantages is that you don't need to rewrite your existing application code or replace your React imports.
You can continue writing familiar React components:
React is a mature and powerful library. Over the years, it has introduced increasingly sophisticated capabilities to support modern application requirements.
Front-End Developer with 3+ years of experience building modern, responsive websites and web applications, focused on React, Next.js, performance, and user experience.
However, not every application needs every runtime feature.
For example, React's concurrent scheduler provides capabilities such as prioritizing updates, interruptible rendering, and time slicing.
These features are valuable, especially for complex user interfaces, but they also introduce additional runtime complexity.
Redact takes a different approach:
Instead of implementing the entire set of React runtime behaviors, it focuses on the APIs and features applications actually need.
One of its key architectural decisions is synchronous rendering.
Unlike React's concurrent rendering model, Redact does not include time slicing or interruptible component rendering.
This simpler execution model helps reduce runtime complexity and bundle size, but it also introduces trade-offs that developers should understand before adopting it.
In Next.js and Vinext, React continues to handle server rendering and Server Components.
Redact takes over client-side rendering and hydration in the browser.
The framework remains responsible for routing, caching, and Server Action transport.
This separation is important because Redact does not attempt to replace the entire framework architecture. It focuses on the client runtime while keeping the existing server-side infrastructure intact.
One of the most interesting parts of Redact is its reported reduction in client-side bundle size.
According to TanStack's official launch measurements, the team built the same small application using React and Redact across different frameworks.
They compared the total emitted client-side JavaScript and CSS after Gzip compression.
Framework
React
Redact
Reduction
TanStack Start
109.3 KB
62.3 KB
43%
Vite
68.3 KB
20.1 KB
70.5%
Vinext
138.1 KB
98.8 KB
28.5%
Next.js
175.6 KB
139.9 KB
20.4%
These results are based on TanStack's specific test applications and build configurations. They should not be interpreted as guaranteed improvements for every React application.
The reported figures include all emitted client JavaScript and CSS, including lazy-loaded chunks. They are not the download size of a single page.
Bundle size is not the only important difference between these runtimes.
The fundamental difference is how rendering work is scheduled.
React uses a concurrent scheduler that can prioritize updates and interrupt rendering work when necessary.
Redact uses synchronous rendering instead.
Consider a component that needs to process a large list or perform an expensive rendering operation.
With React, the scheduler can interrupt rendering at appropriate points, allowing the browser to handle higher-priority work.
With Redact, rendering work is synchronous. A sufficiently expensive render can therefore delay input handling and other interactions.
However, this does not mean Redact completely lacks transition-related features.
It supports behaviors such as suspended transitions, pending states, and optimistic updates, but these capabilities do not provide the full concurrent scheduling model available in React.
This distinction is particularly important when evaluating Redact for applications with complex interfaces or expensive rendering workloads.
No time slicing or interruptible component rendering.
Some APIs and behaviors differ from upstream React.
Third-party library compatibility should be tested.
Expensive synchronous rendering can delay user input.
Hydration, Suspense, and form behavior require real application testing.
Redact also provides feature flags that allow developers to disable optional functionality.
However, disabling a feature changes the runtime behavior available to your application.
For this reason, it's better to start with the default configuration and disable features only when you have verified that neither your application nor its dependencies need them.
I wouldn't consider Redact a universal replacement for React.
React remains a mature and established choice, particularly for applications that rely heavily on its concurrent rendering capabilities.
Redact is an interesting alternative for applications that want to retain the React development experience while reducing the JavaScript runtime delivered to the browser.
Before adopting it, I would recommend the following process:
Analyze your existing bundle using tools such as rollup-plugin-visualizer.
Create a separate branch for evaluating Redact.
Compare production builds using equivalent configurations.
Test hydration, navigation, forms, Suspense, and third-party components.
Benchmark your application's most demanding screens and interactions.
Remember that reducing bundle size does not automatically improve every Core Web Vital, including INP, LCP, or hydration performance.
Measure the actual results instead of relying exclusively on bundle size or microbenchmarks.
TanStack Redact is an interesting addition to the React ecosystem because it explores a different approach to runtime implementation.
Its main idea is simple: preserve the familiar React development experience while delivering a smaller client-side runtime.
The ability to adopt Redact without rewriting components or changing application imports makes it particularly interesting for existing projects.
However, synchronous rendering and the absence of React's full concurrent scheduler introduce important trade-offs.
Ultimately, Redact is not about replacing React everywhere. It is about giving developers another runtime option and allowing them to make more informed decisions about their application's performance.
Rather than trusting benchmark numbers alone, the best approach is to test Redact in a real application and evaluate the results using meaningful performance metrics.