npm.io
2.1.0 • Published 3d ago

@reticlehq/react

Licence
Apache-2.0
Version
2.1.0
Deps
2
Size
37 kB
Vulns
0
Weekly
0
Stars
178

@reticlehq/react

React adapter for Reticle. Walks the React fiber tree so reticle_inspect can map a DOM element back to its component stack and source file — the bridge from "the agent sees a bug in the UI" to "the agent edits the right file".

npm i -D @reticlehq/react
import { install } from '@reticlehq/react';
if (import.meta.env.DEV) install(); // call before reticle.connect()

Requires @reticlehq/browser.

Source-file mapping: on React ≤18, uses dev _debugSource automatically. On React 19 (_debugSource removed), add @reticlehq/babel-plugin to your dev build — the adapter then reads its data-reticle-source stamp so reticle_inspect returns component.source = { file, line, column }.

See the main README. MIT.

Keywords