docs/src/app/react/page.mdx
agent-browser can inspect React component trees, record re-renders, classify Suspense boundaries, measure Core Web Vitals, and perform SPA navigation.
React inspection requires the React DevTools hook to be installed before page JavaScript runs:
agent-browser open --enable react-devtools http://localhost:3000
agent-browser react tree
If the browser is already running, close it before relaunching with --enable react-devtools.
agent-browser react tree
agent-browser react inspect 42
agent-browser react renders start
agent-browser click @e3
agent-browser react renders stop
agent-browser react suspense --only-dynamic
vitals works on any site. When a React profiling build is detected, it also reports hydration phases.
agent-browser vitals
agent-browser vitals https://example.com --json
By default, vitals prints a summary using the same fields as the structured --json response. Reported metrics include LCP, CLS, TTFB, FCP, INP, and hydration timing when available.
pushstate performs client-side navigation without forcing a full browser reload. On Next.js apps, it attempts to use window.next.router.push so RSC fetches still run. Other frameworks fall back to history.pushState plus navigation events.
agent-browser pushstate /dashboard
agent-browser wait --load networkidle
agent-browser snapshot -i
Use open for full navigation and pushstate when the workflow needs SPA behavior.