# OpenTUI React (@opentui/react) A React reconciler for building terminal user interfaces with familiar React patterns. Write TUIs using JSX, hooks, and component composition. ## Overview OpenTUI React provides: - **Custom reconciler**: React components render to OpenTUI renderables - **JSX intrinsics**: ``, ``, ``, etc. - **Hooks**: `useKeyboard`, `useRenderer`, `useTimeline`, etc. - **Full React compatibility**: useState, useEffect, context, and more ## When to Use React Use the React reconciler when: - You're familiar with React patterns - You want declarative UI composition - You need React's ecosystem (context, state management libraries) - Building applications with complex state - Team knows React already ## When NOT to Use React | Scenario | Use Instead | |----------|-------------| | Maximum performance critical | `@opentui/core` (imperative) | | Fine-grained reactivity | `@opentui/solid` | | Smallest bundle size | `@opentui/core` | | Building a framework/library | `@opentui/core` | ## Quick Start ```bash bunx create-tui@latest -t react my-app cd my-app bun run src/index.tsx ``` The CLI creates the `my-app` directory for you - it must **not already exist**. **Agent guidance**: Always use autonomous mode with `-t