Skip to content

Commit 154ac18

Browse files
feat(devtools): update to devtools utils, add solid devtools (#1789)
1 parent 2debbd5 commit 154ac18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3384
-1479
lines changed

.changeset/config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
"access": "public",
99
"baseBranch": "main",
1010
"updateInternalDependencies": "patch",
11-
"fixed": [],
11+
"fixed": [
12+
[
13+
"@tanstack/form-devtools",
14+
"@tanstack/react-form-devtools",
15+
"@tanstack/solid-form-devtools"
16+
]
17+
],
1218
"linked": [],
1319
"ignore": []
1420
}

.changeset/petite-ducks-cough.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@tanstack/react-form-devtools': minor
3+
'@tanstack/solid-form-devtools': minor
4+
'@tanstack/form-devtools': minor
5+
---
6+
7+
Migrated to devtools utils, adds support for solid devtools. Renamed plugin to reflect tanstack plugin schema (FormDevtoolsPlugin to formDevtoolsPlugin)

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ coverage:
99
ignore:
1010
- 'packages/form-devtools'
1111
- 'packages/react-form-devtools'
12+
- 'packages/solid-form-devtools'

docs/framework/react/guides/devtools.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ createRoot(document.getElementById('root')!).render(
3030
)
3131
```
3232

33-
Import the `FormDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
33+
Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
3434

3535
```tsx
3636
import { TanStackDevtools } from '@tanstack/react-devtools'
37-
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
37+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
3838

3939
import App from './App'
4040

4141
createRoot(document.getElementById('root')!).render(
4242
<StrictMode>
4343
<App />
4444

45-
<TanStackDevtools plugins={[FormDevtoolsPlugin()]} />
45+
<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
4646
</StrictMode>,
4747
)
4848
```
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
id: devtools
3+
title: Devtools
4+
---
5+
6+
TanStack Form comes with a ready to go suit of devtools.
7+
8+
## Setup
9+
10+
Install 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
13+
npm i @tanstack/solid-devtools
14+
npm i @tanstack/solid-form-devtools
15+
```
16+
17+
Next in the root of your application import the `TanStackDevtools`.
18+
19+
```tsx
20+
import { TanStackDevtools } from '@tanstack/solid-devtools'
21+
22+
import App from './App'
23+
24+
render(
25+
() => (
26+
<>
27+
<App />
28+
29+
<TanStackDevtools />
30+
</>
31+
),
32+
root!,
33+
)
34+
```
35+
36+
Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
37+
38+
```tsx
39+
import { TanStackDevtools } from '@tanstack/solid-devtools'
40+
import { formDevtoolsPlugin } from '@tanstack/solid-form-devtools'
41+
42+
import App from './app'
43+
44+
const root = document.getElementById('root')
45+
46+
render(
47+
() => (
48+
<>
49+
<App />
50+
51+
<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
52+
</>
53+
),
54+
root!,
55+
)
56+
```
57+
58+
Finally 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+
60+
A complete working example can be found in our [examples section](https://tanstack.com/form/latest/docs/framework/solid/examples/devtools).

examples/react/array/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-devtools": "^0.7.0",
12+
"@tanstack/react-devtools": "^0.7.8",
1313
"@tanstack/react-form": "^1.23.8",
1414
"@tanstack/react-form-devtools": "^0.1.8",
1515
"react": "^19.0.0",

examples/react/array/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react'
22
import { createRoot } from 'react-dom/client'
33

44
import { TanStackDevtools } from '@tanstack/react-devtools'
5-
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
5+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
66
import { useForm } from '@tanstack/react-form'
77

88
interface Person {
@@ -85,7 +85,7 @@ createRoot(rootElement).render(
8585

8686
<TanStackDevtools
8787
config={{ hideUntilHover: true }}
88-
plugins={[FormDevtoolsPlugin()]}
88+
plugins={[formDevtoolsPlugin()]}
8989
/>
9090
</React.StrictMode>,
9191
)

examples/react/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-devtools": "^0.7.0",
12+
"@tanstack/react-devtools": "^0.7.8",
1313
"@tanstack/react-form": "^1.23.8",
1414
"@tanstack/react-form-devtools": "^0.1.8",
1515
"react": "^19.0.0",

examples/react/devtools/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
33

44
import { TanStackDevtools } from '@tanstack/react-devtools'
5-
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
5+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
66

77
import App from './App'
88

@@ -11,7 +11,7 @@ createRoot(document.getElementById('root')!).render(
1111
<App />
1212

1313
<TanStackDevtools
14-
plugins={[FormDevtoolsPlugin()]}
14+
plugins={[formDevtoolsPlugin()]}
1515
eventBusConfig={{ debug: true }}
1616
/>
1717
</StrictMode>,

examples/react/dynamic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-devtools": "^0.7.0",
12+
"@tanstack/react-devtools": "^0.7.8",
1313
"@tanstack/react-form": "^1.23.8",
1414
"@tanstack/react-form-devtools": "^0.1.8",
1515
"react": "^19.0.0",

0 commit comments

Comments
 (0)