Back to blog
October 2026

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

  • React
  • Next
  • TanStack
  • Performance
  • Frontend
  • JavaScript
  • TypeScript
TanStack Redact: A Smaller Runtime for React Applications

TanStack Redact: A Smaller Runtime for React Applications

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.

What Is TanStack Redact?

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:

import { useState } from 'react'

function Counter() {
  const [count, setCount] = useState(0)

  return (
    <button onClick={() => setCount((count) => count + 1)}>
      Clicked {count} times
    </button>
  )
}

export default Counter

Redact focuses on changing the underlying runtime rather than changing the way developers write React applications.

Why Did TanStack Build Redact?

React is a mature and powerful library. Over the years, it has introduced increasingly sophisticated capabilities to support modern application requirements.

ShareShare on XShare on Telegram

Last updated October 2026

A

Amir Esmaeilzadeh

Front-end Developer

Front-End Developer with 3+ years of experience building modern, responsive websites and web applications, focused on React, Next.js, performance, and user experience.

PreviousReact Compiler Explained: Do We Still Need useMemo and useCallback?

Related posts

  • Inside React Server Components: From Server Execution to Browser InteractivityOctober 2026
  • React Compiler Explained: Do We Still Need useMemo and useCallback?October 2026
فا

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.

How Does Redact Work?

Redact integrates with several popular tools and frameworks:

  • TanStack Start
  • Vite
  • Vinext
  • Next.js

Its architecture depends on the framework being used.

In Vite and TanStack Start applications, Redact can handle the rendering runtime used by the application.

However, Next.js and Vinext integrations follow a different model.

              Next.js Application
                      |
             React Server Runtime
                      |
             HTML + RSC Payload
                      |
                  Browser
                      |
               Redact Runtime
                      |
           Client Rendering
              & Hydration

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.

React vs. Redact: Bundle Size Comparison

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.

FrameworkReactRedactReduction
TanStack Start109.3 KB62.3 KB43%
Vite68.3 KB20.1 KB70.5%
Vinext138.1 KB98.8 KB28.5%
Next.js175.6 KB139.9 KB20.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.

Source: Introducing TanStack Redact

Understanding the Rendering Model: React vs. Redact

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.

Getting Started with Redact in a Vite Application

One of Redact's biggest advantages is its integration with existing React projects.

You don't need to rewrite your components or change their imports.

First, install the package:

pnpm add @tanstack/redact

Then update your vite.config.ts:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { redact } from '@tanstack/redact/vite'

export default defineConfig({
  plugins: [
    react(),
    redact(),
  ],
})

Notice that the existing React plugin is still part of the configuration.

You can continue importing your React APIs as usual:

import { useState, useEffect } from 'react'
import { createRoot } from 'react-dom/client'

The Redact plugin handles the runtime replacement during the build process.

Before deploying, make sure to review the official integration and compatibility documentation and run your existing tests.

Official guide: TanStack Redact + Vite

Using Redact with Next.js

Redact also provides an official integration for Next.js.

Update your next.config.mjs:

import { withRedact } from '@tanstack/redact/next'

export default withRedact({})

With this integration, Redact handles the browser runtime while React continues to handle server rendering and Server Components.

The integration covers both the App Router and Pages Router, with support depending on the framework versions and bundlers documented by TanStack.

Official guide: TanStack Redact + Next.js

Is Redact Always Better Than React?

No.

A smaller runtime does not automatically make a runtime the best choice for every application.

Redact offers several interesting advantages, but it also introduces limitations that should be considered before switching.

Advantages

  • Smaller client-side runtime.
  • Familiar React APIs and component model.
  • No application-wide import rewrite.
  • Integrations with popular frameworks and build tools.
  • Support for many commonly used React features.
  • Potentially lower JavaScript delivery costs for users.

Limitations and Trade-offs

  • No full React-style concurrent scheduler.
  • 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.

Redact vs. React: Which One Should You Choose?

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:

  1. Analyze your existing bundle using tools such as rollup-plugin-visualizer.
  2. Create a separate branch for evaluating Redact.
  3. Compare production builds using equivalent configurations.
  4. Test hydration, navigation, forms, Suspense, and third-party components.
  5. 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.

Final Thoughts

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.


Further Reading

  • TanStack Redact — Official Website
  • Redact Documentation
  • Compatibility Guide
  • Bundle Size & Performance
  • Introducing TanStack Redact — TanStack Blog
  • GitHub Repository