A thin React binding over the TraceItX capture core — wrap your app, call open(), and every report ships the DOM, the component tree, a screenshot, console and network as one signed AI-ready envelope.
Install
npm i @traceitx/react
In-app bug reporting for React
The React SDK is the fastest way to add a real bug reporter to a React web app. Wrap your tree in TraceItXProvider, give it your SDK key, and open the reporter from any component with useTraceItX().open(). There’s no floating widget to fight with — you wire it to your own button or hotkey.
What it captures
Every report carries the focused element, the DOM and the React component tree, an in-browser screenshot, and recent console logs and network requests — packed into one signed, typed envelope. Because the SDK understands React, reports point at the actual component (CheckoutForm, not an anonymous <div>), and tap-to-identify lets users mark the exact element they’re reporting.
Same envelope, everywhere
The React SDK produces the identical envelope as every other TraceItX SDK, so your receiver code and AI triage prompts are written once and never change when you add another platform. See the quickstart and the envelope reference.
What's in the box
- Provider + hook API — wrap once with TraceItXProvider, open the reporter anywhere with useTraceItX().open().
- Captures the React component tree alongside the DOM, so reports name the actual component, not just a div.
- open() resolves with the outcome — submitted, queued, or cancelled — so you can confirm to the user.
- Tap-to-identify — users tap an element on the screenshot and the envelope carries the exact component path.
- Mark subtrees sensitive to redact them before anything leaves the browser.
Questions
What if my app is not React?
There is no framework-agnostic web build today — the React SDK is the web path. Native apps have their own SDKs (iOS, Android, React Native). If you need plain JavaScript, Vue or Svelte support, tell us and we will scope it.
Does it work with Next.js and other React frameworks?
Yes. It runs in any React 18+ app, including Next.js, Remix and Vite. Capture happens client-side.