devtools-event-client

Enable typed event communication between libraries and TanStack Devtools.

485|92|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/TanStack/devtools --skill devtools-event-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: devtools-event-client
Source: https://github.com/TanStack/devtools/tree/main/packages/event-bus-client/skills/devtools-event-client
Command: npx skills add https://github.com/TanStack/devtools --skill devtools-event-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust, type-safe event communication layer between your library and the TanStack Devtools, enabling real-time inspection and debugging of your application's state and behavior.

Core Features & Use Cases

  • Typed Event Emission: Define event maps with typed payloads for clear and safe communication.
  • Real-time Debugging: Connect your library's events to DevTools panels for live monitoring.
  • Framework Agnostic: Works seamlessly with React, Vue, Solid, Preact, and vanilla JS.
  • Use Case: Instrument your custom state management library to emit state-changed events, allowing the DevTools to visualize state mutations as they happen.

Quick Start

Install the devtools-event-client package and create a singleton EventClient instance with a unique pluginId.

Frequently Asked Questions about devtools-event-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect my library to DevTools for real-time debugging?

You connect your library to DevTools by creating a singleton EventClient instance with a unique pluginId, which establishes a typed event communication layer for live state inspection. This handles the connection lifecycle with retries and event queuing.

Does the TanStack event client work with Vue and Solid, or is it React-only?

The event client is completely framework agnostic and works seamlessly with React, Vue, Solid, Preact, and vanilla JS. It enables typed event communication between your library and TanStack Devtools regardless of your chosen framework.

How do I define typed event payloads for a custom DevTools plugin?

You define typed event payloads by creating an event map that specifies the payload structure for each event type. The event client automatically applies pluginId namespacing to these events, ensuring safe and clear communication with the DevTools panels.

What happens to emitted events during server-side rendering without DevTools?

During server-side rendering or when DevTools are absent, the event client provides SSR fallbacks and queues emitted events. It handles the connection lifecycle with retries, ensuring no events are lost before the DevTools connection is successfully established.

Can I monitor state management library mutations live in DevTools using an event bus?

Yes, you can instrument your custom state management library to emit state-changed events through the typed event bus. This allows the DevTools to receive the payloads and visualize state mutations as they happen in real-time.

What is the best way to namespace events when building multiple DevTools plugins?

The best way to namespace events is to rely on the EventClient's automatic pluginId namespacing. By assigning a unique pluginId to each client instance, you ensure that emitted events remain isolated and correctly routed to their specific DevTools panel.