Skip to content

Getting Started

Terminal window
pnpm add convex-inspect

Render <ConvexPanel /> anywhere in your app — typically near the root so it’s always available:

import { ConvexPanel } from 'convex-inspect/react';
export default function App() {
return (
<>
{/* your app */}
<ConvexPanel />
</>
);
}

The panel appears as a floating button in the bottom-right corner of the page. Click it to open the event log.

There are two ways to feed events into the panel: drop-in hooks or the event bus.

Replace your existing convex/react imports with the wrapped versions from convex-inspect/react. They’re identical in usage and automatically instrument every call:

import { useQuery, useMutation, useAction } from 'convex-inspect/react';
// useQuery, useMutation, and useAction work exactly like the originals
const tasks = useQuery(api.tasks.list);
const addTask = useMutation(api.tasks.add);
const sendEmail = useAction(api.email.send);

If you use ConvexHttpClient, a custom provider, or want fine-grained control, emit events directly via convexPanelBus:

import { convexPanelBus } from 'convex-inspect/react';
const id = crypto.randomUUID();
const startedAt = Date.now();
// Emit the loading state
convexPanelBus.emit({ id, type: 'mutation', name: 'tasks:add', args: { text: 'Buy milk' }, status: 'loading', startedAt });
// Emit the result
convexPanelBus.emit({ id, type: 'mutation', name: 'tasks:add', args: { text: 'Buy milk' }, status: 'success', result: { ok: true }, startedAt, completedAt: Date.now() });