TX002

Rendered outside a console root

Console

Text.js error TX002: Hooks and components must be rendered inside a console root (createConsoleRoot / renderToConsole).

Why this happens

A Text.js hook or component (useInput, <ScrollBox>, …) rendered under a React root that is not a console root, most often react-dom rendering a component meant for the console.

How to fix it

Render console components through renderToConsole (or createConsoleRoot), not react-dom:

import { renderToConsole, Box, Text } from "@textjs/react";await renderToConsole(  <Box padding={1}>    <Text>Hello, DevTools.</Text>  </Box>,);

To show the same UI on the page, use <TextCanvas> from @textjs/react/dom, which creates its own console root.