TanStack Redact: swapping React's browser runtime for a smaller one
TanStack's Redact replaces React and React DOM in the browser at build time. The bundle savings are real but depend on your framework, and the catch is synchronous rendering. Here is what I would check before trying it.
Manoj Mondal · · 3 min read
- #react
- #performance
- #tanstack
Imagine swapping a car's engine for a lighter one while keeping the body, the seats and the steering wheel. That is the idea behind TanStack Redact. Your components, hooks and react imports stay exactly as they are, and a build plugin sends the browser a smaller runtime instead of React and React DOM.
TanStack announced version 0.2.0 on October 26, 2026, with stable browser integrations for TanStack Start, Vite, Vinext and Next.js. This post is my reading of that announcement and of what to check before using it. It is not a benchmark of my own.
How it plugs in
On Vite it is one extra plugin:
import { redact } from '@tanstack/redact/vite'
export default defineConfig({
plugins: [react(), redact()],
})
On Next.js and Vinext the split is different. React still does the server rendering and Server Components. Redact only takes over hydration and client rendering.
The numbers
TanStack built the same small app twice in each framework, once with React and once with Redact. It then added up the gzip size of all the client JavaScript and CSS that came out, lazy chunks included.
| Framework | React | Redact | Saved |
|---|---|---|---|
| Vite | 68.3 KB | 20.1 KB | 48.1 KB (70.5%) |
| TanStack Start | 109.3 KB | 62.3 KB | 47.0 KB (43.0%) |
| Vinext | 138.1 KB | 98.8 KB | 39.3 KB (28.5%) |
| Next.js | 175.6 KB | 139.9 KB | 35.7 KB (20.4%) |
Look at the Saved column in kilobytes, not percent. The absolute savings are fairly close, between about 36 and 48 KB. The percentage falls because the rest of the framework gets bigger. A tiny Vite app is mostly React, so removing React is a big share. A Next.js app carries a lot besides React, so the same removal is a smaller share.
TanStack also says the percentages will vary by app and are not a promise for any single page.
The catch: it renders synchronously
Think of a chef with a huge order on the stove and a customer who wants a glass of water. React can pause the big order, serve the water, and go back. Redact finishes what it started first.
In technical terms, Redact has no time slicing and no interruptible rendering. TanStack says suspended transitions, pending forms and optimistic state are covered, but a heavy render can still delay input. Appwrite's write-up adds a second warning: libraries that rely on specific React behaviors may need compatibility work.
What a smaller bundle does not tell you
TanStack ran a separate Vinext benchmark over six rounds: 154.9 KB down to 115.5 KB. Production build times were effectively the same, and dev startup was slightly faster. That benchmark does not measure rendering or hydration speed in the browser.
So the size win is shown. Whether your app feels faster or slower is not, and that is the part that depends on your screens.
How I would test it
- Build the same app twice, with and without the plugin, and compare the gzip size per chunk.
- Record the heaviest interactions in the browser's Performance panel: a long list, typing in a rich text editor, scrolling a long document, dragging on a canvas. Look for long tasks and input delay, and compare the two builds.
- Run every third-party library through its real flows, especially any that reach into React internals.
- On Next.js and Vinext, check hydration carefully, since React renders on the server and Redact takes over in the browser.
The screens most worth testing are the ones where React does a lot of work per interaction, such as a contenteditable editor or a virtualized list of PDF pages. A canvas like the one on this site is a smaller risk, because camera moves and drags are written straight to the DOM, outside React. I would still measure it instead of assuming.
The short version
In TanStack's test apps, Redact cut client bundles by 20% to 70% with no code changes, in exchange for giving up interruptible rendering. If bundle size is a real problem for you, it deserves a controlled trial on your heaviest screens. It is not something to swap in blind.
Sources
- Introducing TanStack Redact, TanStack, October 26, 2026
- TanStack Redact and its GitHub repository
- TanStack Redact brings a lighter React runtime, Appwrite
Originally published at tanstack.com.