Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

devtools.md

49 lines1.2 KB

1---
2id: devtools
3title: Devtools
4---
5​
6TanStack Form integrates with the TanStack Devtools shell through a form plugin.
7​
8## Install
9​
10```bash
11npm install @tanstack/react-devtools @tanstack/react-form-devtools
12```
13​
14## Add the plugin
15​
16Render one `TanStackDevtools` instance near the root of the application and pass
17it `formDevtoolsPlugin()`.
18​
19```tsx
20import { StrictMode } from 'react'
21import { createRoot } from 'react-dom/client'
22import { TanStackDevtools } from '@tanstack/react-devtools'
23import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
24​
25import { App } from './App'
26​
27createRoot(document.getElementById('root')!).render(
28 <StrictMode>
29 <App />
30 <TanStackDevtools plugins={[formDevtoolsPlugin()]} />
31 </StrictMode>,
33```
34​
35The plugin discovers mounted forms through the adapter's devtools bridge. Use
36it to inspect current values, validation state, field metadata, and registered
37fields while developing.
38​
39The shell also accepts configuration such as `hideUntilHover`:
40​
41```tsx
42<TanStackDevtools
43 plugins={[formDevtoolsPlugin()]}
44 config={{ hideUntilHover: false }}
45/>
46```
47​
48See the [TanStack Devtools documentation](https://tanstack.com/devtools) for
49shell placement and configuration.