# REACT_API_UNSUPPORTED: React API not supported

> React API not supported

> Esta página ainda não tem tradução para o português; este é o texto em inglês. (This page is not translated yet: the English text follows.)

| Severity | Fault                         | Stage   |
| -------- | ----------------------------- | ------- |
| warning  | customer (the source package) | compile |

## What it means

The component, or a library it imports, uses a React API that Preact's compatibility layer (preact/compat, where react and react-dom resolve) does not provide, such as use, useActionState, useOptimistic, useFormStatus or Profiler, or a React entry point it does not have (react-dom/server, react/compiler-runtime); or it mounts a React root itself (createRoot, render), which a component never needs. A named import of a missing API is an error: the bundle could not load in the browser. A missing API read through a namespace or default import (React.use) is a warning: it is undefined when the code runs, and the component's error boundary catches the failure. Mounting a root is a warning.

## How to fix

Use the supported alternative the message names (useState and an async handler for useActionState, useContext for use(context)), or write that part with Preact's own hooks. The runtime mounts the component: export it with defineTaggorComponent instead of calling createRoot.
