Redact
React, redacted.
Keep your components, hooks, and React imports. Swap in a smaller runtime that renders synchronously, with one Vite plugin.
Redact 0.1.0 measurements. Savings compare all client exports with React 19.3.0. Nano disables all optional features. App sizes vary.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { redact } from '@tanstack/redact/vite'
export default defineConfig({
plugins: [react(), redact()],
})One plugin. Same imports.
Keep writing the React code you know. The Vite plugin handles React, React DOM, server rendering, scheduler, and JSX entrypoints for client and SSR builds.
import { useState } from 'react'
export function Counter() {
const [count, setCount] = useState(0)
return (
<button onClick={() => setCount(count + 1)}>
Clicked {count} times
</button>
)
}Only ship the parts you use.
Start with the default preset, then leave out behavior your app doesn't need. Or start with nano and turn features on individually, with explicit control over hydration, context, portals, Suspense, and more.
// 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 } })Disabling features changes behavior. Nano is not a full-compatibility preset, and feature size savings are not additive.
Know what changes.
Redact keeps the React component model without concurrent scheduling. Rendering and transitions run synchronously, pending stays false, and deferred values return their input. Actions and optimistic state have limited behavior.
Streaming SSR, hydration, Suspense, and Fast Refresh are supported. Server Components stay on upstream React in the RSC environment. React DevTools inspection is not implemented.
Read the compatibility guidePerformance depends on the workload. Published measurements include faster state updates and slower hydration and Suspense retries, they do not establish whole-app speedups.
Performance measurements ↗Partners
Sponsors get special perks like private discord channels, priority issue requests, and direct support!