brust 2.0.0-alpha.5
Guide / React coverage

React coverage

Each React API, and what brust does with it: lowered to native code, rendered once as static markup, or left to React as an island. Every row is a case the test battery builds and checks.

Summary

58 entries from the React reference (react.dev, fetched 2026-10-13): 11 native, 9 static, 30 island, 3 partial, 5 not applicable.

  • Native: compiled to a template the server fills and a binding the browser updates; no React in the browser.
  • Static: rendered once; the page ships the markup and nothing else.
  • React island: the component runs in React, rendered by the worker and hydrated in the browser. The rest of the page keeps its tier.
  • Partial: some shapes of the API are native or static and others are islands; the note says which.
  • Not applicable: the API has no meaning in brust (there is no Server Components runtime).

Hooks

EntryTierNote
useActionStateReact islandany hook outside the supported hooks hook-unsupported
useCallbackNative
useContextReact islandhook-unsupported
useDebugValueReact islandany hook outside the supported hooks hook-unsupported
useDeferredValueReact islandany hook outside the supported hooks hook-unsupported
useEffectNativeeffect-deps: the deps array is complete, so no warning () effect-deps
useEffectEventReact islandany hook outside the supported hooks hook-unsupported
useIdStaticuseId: the server seeds _id0 (); no state or handler, so the tier is static
useImperativeHandleReact islandany hook outside the supported hooks hook-unsupported
useInsertionEffectReact islandany hook outside the supported hooks hook-unsupported
useLayoutEffectNative
useMemoNative
useOptimisticReact islandany hook outside the supported hooks hook-unsupported
useReducerReact islandhook-unsupported
useRefNative
useStateNative
useSyncExternalStoreReact islandhook-unsupported
useTransitionReact islandstartTransition is outside the supported set hook-unsupported

Components

EntryTierNote
<Activity>React island<Activity mode> external-component island-children
<Fragment>Staticstatic fragment root: no <brust-host>, no warning (gaps L8)
<Profiler>Partialisland: d-profiler-bare; refused: d-profiler island-prop external-component island-children
<StrictMode>React islandexternal-component island-children
<Suspense>React islandfixed: a dynamic import() is a dynamic-import fallback, not a printer panic dynamic-import external-component island-children jsx-expression local-component
<ViewTransition>React islandexternal-component island-children

APIs

EntryTierNote
actNot applicableA test helper; it has no runtime meaning in a brust page. Importing it changes nothing about a component.
addTransitionTypeReact islandaddTransitionType inside startTransition hook-unsupported
cacheStaticcache()
cacheSignalStaticcache(): the call is a precompute job on the server
captureOwnerStackReact islandcaptureOwnerStack in a handler hook-unsupported
createContextReact islandcreateContext provider member-tag jsx-expression
experimental_taintObjectReferenceReact islandhook-unsupported
experimental_taintUniqueValueReact islandhook-unsupported
lazyReact islandfixed: a dynamic import() is a dynamic-import fallback, not a printer panic dynamic-import external-component island-children jsx-expression local-component
memoPartialnative/static: b-memo; island: d-memo-state default-export-shape
startTransitionReact islandstartTransition is outside the supported set hook-unsupported
useReact islandhook-unsupported

react-dom hooks

EntryTierNote
useFormStatusPartialnative/static: c-useformstatus-child; island: c-useformstatus; known gap: the root is static and Submit is an island, but the <form> is not a React form, so pending never becomes true; the root should be react hook-unsupported

react-dom components

EntryTierNote
<form>Native<form onSubmit>; known gap: a function action becomes a precompute value that the url_ok guard drops, so the form renders without an action and submits nowhere; it should fall back to react
<input>Nativecontrolled <input>
<select>Nativecontrolled <select>
<textarea>Nativecontrolled <textarea>
<title>Static<title> in a component body
<meta>Static<meta> in a component body
<link>Static<link rel=stylesheet> in a component body
<style>Static<style> element
<script>Static<script async src>

react-dom APIs

EntryTierNote
createPortalReact islandbrowser-global
flushSyncNativeflushSync in a handler; known gap: compiles native but the client chunk imports react-dom (a native chunk must contain no react import); it should fall back to react
preconnectReact islandpreconnect in render body-shape
prefetchDNSReact islandprefetchDNS in render body-shape
preinitReact islandpreinit in render body-shape
preinitModuleReact islandpreinitModule in render body-shape
preloadReact islandpreload in render body-shape
preloadModuleReact islandpreloadModule in render body-shape

Server

EntryTierNote
'use client'Not applicableNo directives: every component is classified by the compiler. The directive is ignored with a warning. use-client-leftover
'use server'Not applicableNo directives: server work is an Elysia app under `[actions]`, or a loader/job. A `'use server'` function is not a server function here.
Server ComponentsNot applicableNo Server Components: a loader and the compiled jobs are the server half, components render to HTML on the Rust server.
Server FunctionsNot applicableNo Server Functions: call an `[actions]` route (`@brust/core/actions`) instead.