Inspector Overview
The component inspector is optional, but it is the recommended add-on when your team wants component-level visibility inside a supported React or Vue app embedded by the hosted Itera editor. Start with the required platform integration, then add the inspector when you need richer tree, props, highlight, snapshot, and element-selection support.
What you are adding
The inspector integration has two startup pieces:
- The embedded bridge handles trusted host messaging, tree inspection, prop serialization, node highlighting, and snapshot requests.
- The iteration runtime handles element selection on the
itera:iteration-inspectorchannel and emitsruntime_readyafter it starts in an embedded page, or whenallowSelfMessaging: trueis enabled.
You normally start both during app startup.
Preferred paths
The preferred startup contract depends on the framework:
- React: use the standard embedded bootstrap path first.
bootstrapEmbeddedInspectorBridge()andinitDevEmbeddedInspectorBridge()default toruntimeConfig: { adapter: 'fiber' }, which is the current preferred React path. - React Storybook: use the dedicated Storybook relay plus preview bootstrap when the debugger loads a Storybook manager URL. Direct
iframe.htmlpreview URLs remain supported as a fallback path. - Vue: prefer explicit mounted-app registration.
bootstrapEmbeddedInspectorBridgeOnMount(...)andregisterVueAppOnMount(...)should run before or immediately aroundapp.mount(...). Mounted-app DOM discovery is fallback behavior, not the primary contract.
Timing requirement
Initialize the inspector as early as possible, ideally before the app becomes interactive:
- In Next.js React apps, place the bootstrap in
instrumentation-client.ts. - In Vite-style React and Vue apps, bootstrap in the browser entrypoint before React becomes interactive or before or immediately around Vue
app.mount(...). - In Nuxt Vue apps, bootstrap from a client-only plugin that runs in the browser before the Nuxt app mounts.
That early timing matters because React installs the inline DevTools backend hook used by the preferred fiber path, and Vue wants explicit app registration in place as the mounted app becomes available to the bridge.
Read this section in order
- Follow the React integration guide if your embedded app is React.
- Use the Storybook integration guide when a React app should be debugged from the Storybook manager URL.
- Follow the Vue integration guide if your embedded app is Vue 3.
- Use the Next.js guide for React apps with
instrumentation-client.ts. - Use the Vite-style guide for entrypoint timing, Vue Vite integration, and the optional source-metadata plugin.
- Check troubleshooting when bootstrap timing, host origins, discovery, or runtime readiness go wrong.