Genie React

The best tools to let an AI agent debug your React app in 2026, run on one real bug

Six tools ran on one React bug where putting an order on hold re-rendered all 13 rows. Four named the prop an agent could act on. One returned a pass or fail verdict with an exit code.

Give your agent a browser driver first, agent-browser or Playwright MCP, so it can click and read the page. Then add the tool that answers your question. Genie names why a component rendered and returns a pass or fail exit code for the fix. agent-react-devtools gives a component tree and a render profile on the command line. Chrome DevTools MCP covers load time, INP and memory. react-scan and the React DevTools panels are built for a person watching. why-did-you-render writes to the console, which an agent can read once you change one option.

I ran six of these tools on the same bug in this repo and kept every command and output in the evidence file. I did not run Playwright MCP or the React DevTools extension. Their rows come from their docs. The Genie steps were re-run on Genie 1.1.0, and the Genie output below comes from that re-run.

One bug, one click, six tools

The Meridian Ops dashboard (apps/realworld-dashboard) lists orders in a virtualized table. Each row is a memoized OrderRow. Putting one order on hold re-renders every visible row, because the table rebuilds the row callback whenever the order list changes:

src/features/orders/orders-table.tsx
const onStatusChange = useCallback(
  (id: string, status: OrderSummary['status']) => {
    const order = rows.find((row) => row.id === id)
    if (order) changeStatus({ id, number: order.number, status })
  },
  [rows, changeStatus],
)

The interaction was the same in every run. The agent opened the Actions menu for SO-105979, clicked Put on hold, and waited for the toast:

agent-browser --session art-m1 find role button click --name 'Actions for SO-105979'
agent-browser --session art-m1 find role menuitem click --name 'Put on hold'
agent-browser --session art-m1 wait --text 'SO-105979 updated'

Genie counted 13 mounted rows, all 13 updated, and 29 OrderRow renders in total.

What each tool told the agent

Genie answers on the command line. The agent opens a render window, runs the interaction, and waits until React, Query and Router are all settled, so the refetch after the mutation lands before the read:

npx genie-react call react_clear_renders '{"component":"OrderRow"}' --session upd-g
# Run the three agent-browser commands above, with --session upd-g.
npx genie-react call devtools_wait '{"condition":"settled","domains":["react","query","router"],"timeoutMs":10000}' --fail-on-result-error --session upd-g
npx genie-react call react_render_causes '{"component":"OrderRow","limit":3}' --session upd-g

react_render_causes names the prop for each row and grades the evidence (trimmed to two of 29 events):

  OrderRow #13713092378813 {renderEventId:render:17:241,mountId:mount:6,key:o-105915}
    ← props exact onStatusChange
  OrderRow #13713092378779 {renderEventId:render:17:240,mountId:mount:5,key:o-105917}
    ← props exact onStatusChange

agent-react-devtools also answers on the command line. profile rerenders printed one line per row, all 13 with the same culprit (trimmed to two):

  ? [memo] Memo(OrderRow)  2 renders  causes:props-changed  changed: props: onStatusChange
  ? [memo] Memo(OrderRow)  2 renders  causes:props-changed  changed: props: order, onStatusChange

agent-browser has its own React profiler. Open the session with --enable react-devtools, then react renders start and react renders stop. Its change details listed OrderRow props.onStatusChange: fn() -> fn(). Its counts did not match the other tools: it reported 26 OrderRow instances and 122 re-renders for a page with 13 rows.

why-did-you-render writes to the browser console, which an agent reads with agent-browser console. With the setup from its README and trackAllPureComponents: true, it logged nothing about OrderRow. With logOnDifferentValues: true it logged 10 OrderRow groups and traced the callback one step further than any other tool, to the useCallback dependency:

[log] {prev onStatusChange:parent-hook-useCallback-deps[0]: Array(1054)} !== {next onStatusChange:parent-hook-useCallback-deps[0]: Array(1054)}

react-scan drew OrderRow ×2 over each row. With log: true it printed 29 console groups named OrderRow, with no prop names inside. With its default toolbar on, the toolbar covered the Actions button of the last visible row, and agent-browser refused the click.

Chrome DevTools MCP traced the click and reported no problem (trimmed to one sentence):

The longest interaction on the page was a `pointerdown` which had a total duration of `28 ms`.

The trace lists React's Components ⚛ track, but its summary named no component. On this machine the click cost 28 ms. The bug shows up as wasted renders, and the trace summary does not count renders.

Only one tool returned a verdict

To prove the fix, Genie's verify takes claims before the interaction and returns an exit code after it. The claim allows mount because three rows below the fold mounted during the click, and a mount is not the bug:

npx genie-react verify begin --session upd-g --name 'put one order on hold' \
  --claim 'render OrderRow only props.order,mount' --claim 'render OrderRow min 1' --claim 'boundaries clean'
# Run the three agent-browser commands above, with --session upd-g.
npx genie-react verify end <id> --session upd-g

Before the fix, trimmed to the verdict and first claim (exit code 1):

fail vfy_673952a4-e627-4f4c-b938-f894742abd3a "put one order on hold"  10 commits, quiet after 830 ms (react, query, router, network)
  1 fail render OrderRow only props.order,mount  {renders:29,events:29,violatingEvents:26,causes:[mount,props.onStatusChange,props.order]}

The fix is the reference fix from the answer key. The callback takes the whole order, so it no longer depends on rows:

   const onStatusChange = useCallback(
-    (id: string, status: OrderSummary['status']) => {
-      const order = rows.find((row) => row.id === id)
-      if (order) changeStatus({ id, number: order.number, status })
-    },
-    [rows, changeStatus],
+    (order: OrderSummary, status: OrderSummary['status']) => changeStatus({ id: order.id, number: order.number, status }),
+    [changeStatus],
   )

OrderRow changes to call onStatusChange(order, 'on_hold') and its prop type changes with it. After the fix, the same claims passed with exit code 0:

pass vfy_dd4ac4d4-d0e2-4ab7-aa00-2dbaf890c7fa "put one order on hold"  10 commits, quiet after 2015 ms (react, query, router, network)
  1 pass render OrderRow only props.order,mount  {renders:5,events:5,violatingEvents:0,causes:[mount,props.order]}

agent-react-devtools can compare two exported profiles with profile diff. It ranks components by average render time. With the default threshold, OrderRow was missing from the diff. With --threshold 0 it showed renders: 29 -> 5. The command exits 0 either way, so the agent still has to judge the result itself. See Verify a fix for Genie's claim forms.

What each tool reads, how it installs, and what it proves

ToolWhat an agent can readHow it installsReact NativeProves a fix
GenieRender causes with evidence grades, effects, Query, Router, error boundaries, as CLI text or JSONgenie-react init adds it to Vite or Next.js. Other bundlers and React Native set up the hook by handYes, with agent-device as the driverYes. verify exits 0, 1, 4 or 5
agent-react-devtoolsComponent tree, props, state, hooks, render profiles with changed props, on its CLInpm package, Vite plugin or connect import, local daemonYes, through a Metro wrapperCompares two profiles. No pass or fail
react-scanOutlines on the page. Component names in the console with log: true. An onRender APIScript tag, or npx -y react-scan@latest initIts README does not mention itNo
why-did-you-renderConsole groups with prop and hook diffsnpm package, a wdyr file, and the library as JSX import sourceYes, per its READMENo
React DevToolsComponents and Profiler panels, built for a personBrowser extension, or the react-devtools npm packageBuilt into React Native DevTools from 0.76No
Chrome DevTools MCPTraces, INP and LCP insights, console, network, heap snapshotsMCP server config, npx -y chrome-devtools-mcp@latestIts README does not mention itNo. It measures, and the agent compares
Playwright MCPAccessibility snapshots, console, network, script evaluationMCP server config, npx @playwright/mcp@latestIts README does not mention itIt checks the screen, not renders
agent-browserAccessibility snapshots with refs, console, errors, and react commandsnpm install -g agent-browser, then agent-browser installNot a native driver. Genie uses agent-device thereIt checks the screen, not renders

Which tool for which job

  • To let the agent click, type and read the page, use agent-browser or Playwright MCP. Playwright's README itself points coding agents to its CLI and skills, which use fewer tokens than the MCP server.
  • To find a slow page load, a bad INP score or a memory leak, use Chrome DevTools MCP. Genie does not run Lighthouse or Chrome's performance insights.
  • To watch re-renders while you click around yourself, use react-scan. The overlay shows the problem with no reading at all.
  • To see why a prop changed identity, through useCallback and useMemo dependencies, turn on why-did-you-render with logOnDifferentValues. In this run it went one step deeper than Genie, which named onStatusChange but not the rows dependency behind it.
  • To give an agent a React tree and a profile on the command line, use agent-react-devtools.
  • To have the agent name the cause with a grade, and prove the fix with an exit code your CI or reviewer can trust, use Genie. The renders and effects guide shows the reads, and another article walks this same bug through verify.

When Genie is not the answer

Genie needs a development build of React 18 or newer, so it cannot profile production. It does not see the screen, so you still need the driver to confirm what the user sees. Your app also has to install genie-react. If you only want to look at one slow page once, react-scan or the React DevTools Profiler gets you there with less setup.

On this page