Skip to content
TanStack

Redact

For the love of React, and smaller bundles.

Keep the components, hooks, and imports you love. Redact is a smaller, synchronous runtime for React apps, with integrations for TanStack Start, Vite, Vinext, and Next.js.

TanStack Start

47.0 KB less

43.0% smaller

Vite

48.1 KB less

70.5% smaller

Vinext

39.3 KB less

28.5% smaller

Next.js

35.7 KB less

20.4% smaller

Same counter app. All client JS + CSS, gzip. Source ↗

Bring your framework.

App Router and Pages Router, with Turbopack or Webpack. Keep React installed, it still runs your server.

Next.js setup and coverage ↗

The Next.js and Vinext release isn't published yet. Track the release.

next.config.mjs
import { withRedact } from '@tanstack/redact/next'

export default withRedact({
  // Your existing Next.js options
})

Server Components stay with React.

In Next.js and Vinext, the framework keeps server rendering, Server Components, caching, and action transport. Redact picks up in the browser, hydrates the HTML, and runs your client components.

ServerReact
HTML + Flight →
BrowserRedact

Smaller comes with a choice.

Redact renders synchronously, without React's time slicing or interruptible component renders. Suspended transitions can keep the current screen visible, actions can show pending and optimistic state, and streamed content can still arrive as it's ready.

Rendering and API differences ↗

More than a counter demo.

The compatibility suite runs real browser journeys in Chromium, Firefox, and WebKit. Both App Router and Pages Router are in the matrix, including apps that only use Pages Router.

Test matrix and recorded results ↗
  • Navigate without losing your place.Retained layouts, back and forward, shallow routing, redirects, and canceled navigation.
  • Submit, wait, and recover.Server Actions, pending forms, optimistic updates, uploads, and error boundaries.
  • Pick up where the server left off.Hydration, streamed Suspense, Cache Components, and Fast Refresh that keeps state through an edit.

Vite apps can go smaller still.

Leave out features your app doesn't use, or start with nano and add them back. Next.js and Vinext use the full runtime so their framework features stay available.

Choose your Vite features ↗
vite.config.ts
// A client-rendered app without class components
redact({
  features: { hydration: false, classComponents: false },
})

// All optional features off, then context enabled
redact({ preset: 'nano', features: { context: true } })

Partners

Gold
Lovable
Netlify
CodeRabbit
Vercel
Cloudflare
Render
Railway
Silver
SerpApi
Clerk
OpenRouter
WorkOS
AG Grid
Bronze
Prisma
Unkey
Sentry
Scarf
OSS Sponsors

Sponsors get special perks like private discord channels, priority issue requests, and direct support!