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

devtools.md

60 lines1.5 KB

1---
2id: devtools
3title: Devtools
4---
5​
6TanStack Form comes with a ready to go suit of devtools.
7​
8## Setup
9​
10Install the [TanStack Devtools](https://tanstack.com/devtools/latest/docs/quick-start) library and the [TanStack Form plugin](http://npmjs.com/package/@tanstack/solid-form-devtools), from the framework adapter that your working in (in this case `@tanstack/solid-devtools`, and `@tanstack/solid-form-devtools`).
11​
12```bash
13npm i @tanstack/solid-devtools
14npm i @tanstack/solid-form-devtools
15```
16​
17Next in the root of your application import the `TanStackDevtools`.
18​
19```tsx
20import { TanStackDevtools } from '@tanstack/solid-devtools'
21​
22import App from './App'
23​
24render(
25 () => (
26 <>
27 <App />
28​
29 <TanStackDevtools />
30 </>
31 ),
32 root!,
34```
35​
36Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
37​
38```tsx
39import { TanStackDevtools } from '@tanstack/solid-devtools'
40import { formDevtoolsPlugin } from '@tanstack/solid-form-devtools'
41​
42import App from './app'
43​
44const root = document.getElementById('root')
45​
46render(
47 () => (
48 <>
49 <App />
50​
51 <TanStackDevtools plugins={[formDevtoolsPlugin()]} />
52 </>
53 ),
54 root!,
56```
57​
58Finally add any additional configuration you desire to the `TanStackDevtools` component, more information can be found under the [TanStack Devtools Configuration](https://tanstack.com/devtools/) section.
59​
60A complete working example can be found in our [examples section](https://tanstack.com/form/latest/docs/framework/solid/examples/devtools).