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

Client JS + CSS, gzip. Pale green: optional features. Source ↗

Bring your framework.

Add Redact after Start and React. Bundle server dependencies so their React imports use the same runtime as your app.

Start setup and coverage ↗
vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import react from '@vitejs/plugin-react'
import { redact } from '@tanstack/redact/vite'

export default defineConfig({
  ssr: { noExternal: true },
  plugins: [tanstackStart(), react(), redact()],
})

Server Components stay with React.

In Vinext and Next.js, 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.

Start and Vite can go smaller still.

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

Choose your features ↗
vite.config.ts
// Start: keep hydration and router features
redact({
  features: {
    activity: false,
    fragmentRefs: false,
    portal: false,
  },
})

// Vite: a client-only app without optional features
redact({ preset: 'nano' })

Partners

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

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