Skip to content
Vidact

Reference

React compatibility

The documented React-shaped subset and how each surface behaves under Vidact.

Vidact compiles a subset of React 19. This page summarizes what is in that subset, what needs a feature flag, what behaves differently, and what is rejected. Compatibility remains source-shape and target specific; a package or component is certified only to the level exercised by its repository tests.

How to read the tables

StatusMeaning
SupportedWorks in compiled source subject to the documented notes
Opt-inWorks when the named feature is enabled
AdaptedWorks for the same purpose, with a documented difference
Server / HydrateAvailable only in that build target
RejectedCompile-time error; there is no fallback
TrackedReact canary API with no stability promise yet

Components

APIStatusNotes
Function componentsSupportedRun once per mount
Arrow, expression, default-export componentsSupported
Custom hooksSupportedMust be in the same module as the caller
Class componentsRejectedUse functions
JSX, fragments, arrays, conditionalsSupported
keySupportedMust be a primitive; duplicates throw
ref as a propSupported
forwardRefAdaptedInline component functions only, as a migration aid
memoAdaptedAccepted; no custom comparator; not a performance tool
createElementAdaptedStatically known elements compile; a runtime element type renders through the runtime
createPortalAdaptedClient only; events bubble through the physical DOM
lazy, SuspenseOpt-in async
ActivityOpt-in retained-ui
StrictModeAdaptedAccepted; no double invocation
ProfilerOpt-in profilingReports Vidact work, not render time
ViewTransition, Fragment refsTracked

Hooks

HookStatusNotes
useStateSupported
useReducerSupported
useRefSupported
useImperativeHandleSupported
useEffect, useLayoutEffectSupportedPass a dependency array
useEffectEventSupported
useInsertionEffectOpt-in css-insertion
useMemo, useCallbackSupportedIdentity preserved where observable; not a performance tool
useIdSupportedStable across server and client
useContext, use(context)Supported
use(promise)Opt-in async
useSyncExternalStoreSupported
useTransition, useDeferredValueOpt-in concurrent
useActionState, useOptimisticOpt-in actions
useFormStatusOpt-in actions
useDebugValueOpt-in profiling

DOM and events

FeatureStatusNotes
HTML, SVG, MathML, custom elementsSupportedNamespaces handled automatically
Attributes, properties, style objects, spreadsSupportedSpreads are reactive
Event handlersAdaptedNative DOM events, no synthetic layer; unknown event props are rejected
Capture handlers (onClickCapture)Supported
Controlled formsSupportedonChange timing matches React
Function form actionOpt-in actions
dangerouslySetInnerHTMLOpt-in unsafe-html
Host and callback refsSupported

Roots and rendering

APIStatusNotes
createRoot(host).render(element)AdaptedUse mountCompiled(Component, host) or createRoot(host).mount(Component)
hydrateRootHydrateTakes a component, not an element
renderToString, renderToStaticMarkupServer
renderToReadableStream, renderToPipeableStreamServer + framework
prerender, resumeServer + framework
Error boundariesAdaptederrorBoundary() function plus root callbacks
flushSyncOpt-in concurrent
startTransitionOpt-in concurrent
Resource hints (preload, preinit, …)Opt-in framework
cacheOpt-in framework, server only
Server Components and Server FunctionsOpt-in frameworkExplicit manifests; not React Flight

Element utilities

APIStatusNotes
Children.toArrayAdaptedAccepts one compiled value
Other Children utilitiesRejected
cloneElementAdaptedCompiled values only
isValidElementAdaptedTests for a compiled value
createRefRejectedUse useRef or ref-as-prop
findDOMNode, legacy rootsRejected
React DevToolsRejectedNo Fiber to inspect

Testing

APIStatusNotes
actSupportedFrom @vidact/test-support

Third-party packages

A package is eligible for Vidact compilation when its reachable code stays inside this subset. The Vite plugin detects React dependencies from package metadata and recognizes both JSX and published react/jsx-runtime calls. Packages that depend on rejected APIs or React internals fail at build time.

Successful compilation does not certify an entire package. The browser corpus exercises selected @base-ui/react button, switch, and accordion interactions. Other components and combinations need their own tests, including hydration and keyboard behavior. Run the paths your application uses against the package versions you intend to ship.