devtools/docs/framework/preact/basic-setup.md
Alem Tuzlak 9bf08e270f
docs: comprehensive documentation overhaul (#363)
* docs: add documentation redesign design document

Comprehensive plan for restructuring TanStack Devtools documentation
with layered architecture approach: Getting Started, Concepts, Guides,
API Reference, and Examples sections. Adds 11 new pages including
architecture overview, event system deep-dive, Vue framework support,
and plugin building guides.

* docs: add documentation implementation plan

18-task plan covering: navigation restructure, 4 new Concepts pages
(architecture, event system, plugin lifecycle, source inspector),
3 new Guides (custom plugins, devtools-utils, bidirectional comms),
Vue framework support, Solid custom plugins, and updates to existing
pages including overview, quick-start, installation, and React adapter.

* docs: restructure navigation with Concepts and Guides sections, add Vue

* docs: expand overview with package map and architecture diagram

* docs: add all framework examples to quick start

* docs: add Vue and Preact installation instructions

* docs: add architecture overview page

* docs: add event system concepts page

* docs: add plugin lifecycle concepts page

* docs: add source inspector concepts page

* docs: add framework-agnostic custom plugin building guide

* docs: add devtools-utils guide for plugin factory helpers

* docs: add bidirectional communication guide

* docs: add Vue basic setup and adapter pages

* docs: add Vue and Solid custom plugins guides

* docs: replace TODO in React adapter with actual content

* docs: expand Vite plugin features documentation

* docs: fix event map key convention, typos, and internal link extensions

- Event map keys should be suffix-only (e.g., 'state-update'), not
  prefixed with pluginId. EventClient prepends pluginId automatically.
  Fixed across all custom plugin guides and concept pages.
- Fix enabled:false docs in event-system.md (emit is a no-op, not
  internal dispatch)
- Fix double "the the" typo in installation.md
- Remove .md extensions from internal doc links for consistency
- Fix event map key in configuration.md example

* docs: remove internal plan files

* docs: replace ASCII diagrams with mermaid in architecture overview

* docs: add mermaid diagrams across all documentation pages

- overview.md: architecture layer diagram
- event-system.md: connection lifecycle state diagram
- plugin-lifecycle.md: mount sequence flowchart + portal pattern diagram
- source-inspector.md: inspection flow diagram
- building-custom-plugins.md: plugin architecture overview
- bidirectional-communication.md: two-way flow + time travel sequence diagram
- vite-plugin.md: sub-plugin overview diagram
2026-03-04 13:52:26 +01:00

1.7 KiB

title id
Basic setup basic-setup

TanStack devtools provides you with an easy to use and modular client that allows you to compose multiple devtools into one easy to use panel.

Setup

Install the TanStack Devtools library, this will install the devtools core as well as provide you framework specific adapters.

npm i @tanstack/preact-devtools

Next in the root of your application import the TanStackDevtools from the required framework adapter (in this case @tanstack/preact-devtools).

import { TanStackDevtools } from '@tanstack/preact-devtools'
import { render } from 'preact'

import App from './App'

render(
  <>
    <App />

    <TanStackDevtools />
  </>,
  document.getElementById('root')!,
)

Import the desired devtools and provide it to the TanStackDevtools component along with a label for the menu.

Currently TanStack offers:

  • QueryDevtools
  • RouterDevtools
  • PacerDevtools
  • FormDevtools coming soon
import { render } from 'preact'

import { TanStackDevtools } from '@tanstack/preact-devtools'

import App from './App'

render(
  <>
    <App />

    <TanStackDevtools
      plugins={[
        {
          name: 'Your Plugin',
          render: <YourPluginComponent />,
        },
      ]}
    />
  </>,
  document.getElementById('root')!,
)

Finally add any additional configuration you desire to the TanStackDevtools component, more information can be found under the TanStack Devtools Configuration section.

A complete working example can be found in our basic example.