Skip to content

Reference

React compatibility

A complete list of React 19 APIs and how each one behaves under Vidact.

Vidact compiles a subset of React 19. This page is the authoritative list of what is in that subset, what needs a feature flag, what behaves differently, and what is rejected.

How to read the tables

StatusMeaning
SupportedWorks as in React
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 (props, ref) form only, as a migration aid
memoAdaptedAccepted; no custom comparator; not a performance tool
createElementAdaptedOnly when the type and props are statically known
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 works with Vidact when it ships React-shaped source inside this subset. The Vite plugin compiles such packages automatically when their package.json declares React. Packages that are precompiled against React's runtime, or that depend on rejected APIs, do not work and are reported at build time.