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

devtools.md

52 lines1.5 KB

1---
2id: devtools
3title: Devtools
4---
5​
6TanStack Form comes with a ready-to-go suite 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/react-form-devtools), from the framework adapter that you're working in (in this case `@tanstack/react-devtools` and `@tanstack/react-form-devtools`).
11​
12```bash
13npm i @tanstack/react-devtools
14npm i @tanstack/react-form-devtools
15```
16​
17Next, in the root of your application, import the `TanStackDevtools`.
18​
19```tsx
20import { TanStackDevtools } from '@tanstack/react-devtools'
21​
22import App from './App'
23​
24createRoot(document.getElementById('root')!).render(
25 <StrictMode>
26 <App />
27​
28 <TanStackDevtools />
29 </StrictMode>,
31```
32​
33Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
34​
35```tsx
36import { TanStackDevtools } from '@tanstack/react-devtools'
37import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
38​
39import App from './App'
40​
41createRoot(document.getElementById('root')!).render(
42 <StrictMode>
43 <App />
44​
45 <TanStackDevtools plugins={[formDevtoolsPlugin()]} />
46 </StrictMode>,
48```
49​
50Finally, 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.
51​
52A complete working example can be found in our [examples section](https://tanstack.com/form/latest/docs/framework/react/examples/devtools).